Extract and validate user identifier columns from tables using live Treasure Data analysis
Extracts and validates user identifier columns from Treasure Data tables using live analysis.
/plugin marketplace add treasure-data/aps_claude_tools/plugin install treasure-data-cdp-unification-plugins-cdp-unification@treasure-data/aps_claude_toolsI'll analyze your Treasure Data tables to extract and validate user identifier columns using the unif-keys-extractor specialized agent.
This command performs ZERO-TOLERANCE identifier extraction:
Provide the tables you want to analyze for ID unification:
database.table_nameanalytics.user_events, crm.customers, web.pageviewsFor each table, I'll:
mcp__mcc_treasuredata__describe_table(table, database)I'll scan for valid user identifier columns:
✅ VALID USER IDENTIFIERS:
❌ NOT USER IDENTIFIERS (EXCLUDED):
For tables WITHOUT user identifiers, I'll:
For tables WITH user identifiers, I'll:
SELECT MIN(column), MAX(column) FROM tableI'll provide structured analysis from three perspectives:
I'll provide:
| database_name | table_name | column_name | data_type | identifier_type | min_value | max_value |
|---------------|------------|-------------|-----------|-----------------|-----------|-----------|
| analytics | user_events| user_email | varchar | email | a@test.com| z@test.com|
| analytics | user_events| td_client_id| varchar | cookie_id | 00000000-.| ffffffff-.|
| crm | customers | email | varchar | email | admin@... | user@... |
## Tables EXCLUDED from ID Unification:
- **analytics.product_catalog**: No user identifier columns found
- Available columns: [product_id, sku, product_name, category, price]
- Exclusion reason: Contains only product metadata - no PII
- Classification: Non-PII table
## Analysis Summary:
- **Tables Analyzed**: 5
- **Tables INCLUDED**: 3 (contain user identifiers)
- **Tables EXCLUDED**: 2 (no user identifiers)
- **User Identifier Columns Found**: 8
**Expert 1 - Data Pattern Analyst:**
- Email columns show valid format patterns across 2 tables
- td_client_id shows UUID format with good coverage
- Data quality: High (95%+ non-null for email)
**Expert 2 - Cross-Table Relationship Analyst:**
- Email appears in analytics.user_events and crm.customers (primary link)
- td_client_id unique to analytics.user_events (secondary ID)
- Recommendation: Email as primary key for unification
**Expert 3 - Priority Assessment Specialist:**
- Priority 1: email (stable, cross-table presence, good coverage)
- Priority 2: td_client_id (system-generated, analytics-specific)
- Recommended merge_by_keys: [email, td_client_id]
Recommended Priority Order (TD Standard):
1. email - Stable identifier across multiple tables with high coverage
2. td_client_id - System-generated ID for analytics tracking
3. phone - Secondary contact identifier (if available)
EXCLUDED Identifiers (Not User-Related):
- product_id - Product reference, not user identifier
- campaign_id - Campaign metadata, not user-specific
I'll pass through these mandatory validation gates:
After key extraction, you can:
/cdp-unification:unify-setup to continue with complete configuration/cdp-unification:unify-create-prep with the extracted keysI'll use TD Copilot standard format:
Question: Are these extracted user identifiers sufficient for your ID unification requirements?
Suggestion: I recommend using email as your primary unification key since it appears across multiple tables with good data quality.
Check Point: The analysis shows X tables with user identifiers and Y tables excluded. This provides comprehensive coverage for customer identity resolution.
Ready to extract user identifiers? Please provide your table list:
Example:
Please analyze these tables for ID unification:
- analytics.user_events
- crm.customers
- web.pageviews
- marketing.campaigns
I'll call the unif-keys-extractor agent to perform comprehensive analysis with ZERO-TOLERANCE validation.
Let's begin the analysis!