Complete end-to-end ID unification setup from table analysis to deployment
Sets up complete ID unification for Treasure Data CDP from analysis to deployment.
/plugin marketplace add treasure-data/aps_claude_tools/plugin install treasure-data-cdp-unification-plugins-cdp-unification@treasure-data/aps_claude_toolsI'll guide you through the complete ID unification setup process for Treasure Data CDP. This is an interactive, end-to-end workflow that will:
Please provide the list of tables you want to include in ID unification:
database.table_name (e.g., analytics.user_events, crm.customers)mck, client)claude, customer_360)config)
${client_short_name}_${lookup_suffix} (e.g., client_config)I'll explain the options and help you choose:
I'll:
I'll:
I'll create:
unification/dynmic_prep_creation.dig - Prep workflowunification/queries/create_schema.sql - Schema creationunification/queries/loop_on_tables.sql - Dynamic loop logicunification/queries/unif_input_tbl.sql - DSAR processing and data cleaningunification/config/environment.yml - Client configurationunification/config/src_prep_params.yml - Dynamic table mappingsI'll create:
unification/config/unify.yml - Unification configuration with keys and tablesunification/id_unification.dig - Core unification workflow with HTTP API callunification/queries/create_schema.sql - Schema with all required columnsI'll create:
unification/config/stage_enrich.yml - Enrichment configurationunification/enrich/queries/generate_join_query.sql - Join query generationunification/enrich/queries/execute_join_presto.sql - Presto executionunification/enrich/queries/execute_join_hive.sql - Hive executionunification/enrich/queries/enrich_tbl_creation.sql - Table creationunification/enrich_runner.dig - Enrichment workflowI'll create:
unification/unif_runner.dig - Main workflow that calls:
CRITICAL: Before deployment, I MUST run comprehensive validation:
/cdp-unification:unify-validate commandIf validation FAILS:
If validation PASSES:
I'll provide:
I'll use the TD Copilot communication pattern throughout:
unification/ directory):Workflows:
unif_runner.dig - Main orchestration workflowdynmic_prep_creation.dig - Prep table creationid_unification.dig - Core unificationenrich_runner.dig - Staging enrichmentConfiguration:
config/environment.yml - Client settingsconfig/src_prep_params.yml - Prep table mappingsconfig/unify.yml - Unification configurationconfig/stage_enrich.yml - Enrichment configurationSQL Templates:
queries/create_schema.sql - Schema creationqueries/loop_on_tables.sql - Dynamic loop logicqueries/unif_input_tbl.sql - DSAR and data cleaningenrich/queries/generate_join_query.sql - Join generationenrich/queries/execute_join_presto.sql - Presto executionenrich/queries/execute_join_hive.sql - Hive executionenrich/queries/enrich_tbl_creation.sql - Table creationAll generated files will:
Ready to begin? Please provide:
I'll start by analyzing your tables with the unif-keys-extractor agent to extract and validate user identifiers.
Example:
I want to set up ID unification for:
- analytics.user_events
- crm.customers
- web.pageviews
Client: mck
Unification name: customer_360
Let's get started!