Agent skill
parent-segment
Manages CDP parent segments using `tdx ps` commands with YAML configs. Covers master tables, attributes, behaviors, `tdx ps validate` for join validation, `tdx ps preview` for data preview, and schedule configuration (daily/hourly/cron). Use when creating customer master tables, validating join match rates, or troubleshooting parent segment workflows.
Install this agent skill to your Project
npx add-skill https://github.com/treasure-data/td-skills/tree/main/tdx-skills/parent-segment
SKILL.md
tdx Parent-Segment - CDP Parent Segment Management
Core Commands
tdx ps list # List parent segments
tdx ps pull "Customer 360" # Pull to YAML (sets context)
tdx ps push # Push changes
tdx ps validate # Validate all
tdx ps validate --attribute "User Profile" # Validate specific attribute
tdx ps preview --enriched # Preview joined data
tdx ps run # Push and run workflow
tdx ps fields # List segmentation fields
YAML Configuration
name: "Customer 360"
master:
database: cdp_db
table: customers
filters: # Optional: max 2 filters
- column: status
values: ["active"]
schedule:
type: daily # none | hourly | daily | weekly | cron
time: "03:00:00"
timezone: "America/Los_Angeles"
attributes:
- name: "User Profile"
source:
database: cdp_db
table: user_profiles
join:
parent_key: user_id
child_key: customer_id
columns:
- column: age
type: number
behaviors:
- name: "Purchases"
source:
database: cdp_db
table: purchase_events
join:
parent_key: user_id
child_key: customer_id
columns:
- column: amount
type: number
Common Issues
| Issue | Solution |
|---|---|
| Low join match rate | tdx ps preview --master and --attribute to compare keys |
| Workflow fails | tdx ps validate --master, --attribute, --behavior |
Related Skills
- segment - Child segments using parent segment data
- tdx-basic - Core CLI operations
Resources
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
email-campaign
This skill should be used when the user asks to "create an email", "build an email campaign", "design an email template", "generate an email for a segment", "preview an email", or "push an email to Engage". Generates enterprise-grade HTML email templates with live preview in Treasure Studio and natural language editing, then pushes the final version to Treasure Engage.
action-report
YAML format reference for action reports rendered via preview_action_report. MUST be read before writing any action report YAML — defines the report structure (title, summary, actions array) and action item fields (as_is, to_be, reason, priority, category, impact) with incremental build workflow. Required by seo-analysis and any skill that produces prioritized recommendations.
grid-dashboard
YAML format reference for grid dashboards rendered via preview_grid_dashboard. MUST be read before writing any dashboard YAML — defines the page structure, 6 cell types (kpi, gauge, scores, table, chart, markdown), grid layout rules, cell merging syntax, and incremental build workflow. Required by seo-analysis and any skill that produces visual data dashboards.
seo-analysis
Runs SEO and AEO (Answer Engine Optimization) analysis on websites or specific pages. Use when the user mentions SEO, AEO, search rankings, search optimization, or wants to analyze how their pages perform in search engines and AI answers. Produces a data dashboard and action report with before/after recommendations.
aps-doc-core
Core documentation generation patterns and framework for Treasure Data pipeline layers. Provides shared templates, quality validation, testing framework, and Confluence integration used by all layer-specific documentation skills.
aps-doc-id-unification
Expert documentation generation for ID unification layers. Documents identity resolution algorithms, merge strategies, match rules, entity graphs, and multi-workflow orchestration. Use when documenting ID unification processes.
Didn't find tool you were looking for?