{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"tdx cas - Composable Audience Studio | Treasure AI","description":"Manage Composable Audience Studio (CAS) resources. Zero-copy CDP audiences on Snowflake, Databricks, and BigQuery.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cas-commands","__idx":0},"children":["CAS Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Manage Composable Audience Studio (CAS) resources — zero-copy CDP audiences that run directly on customer Cloud Data Warehouses (Snowflake, Databricks, BigQuery) without moving data into Treasure AI."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"backend-endpoint","__idx":1},"children":["Backend endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas"]}," requests are served by cdp-api by default, following the CAS platform's cas-api → cdp-api mergeback. If you need to reach a composable audience that still only exists in the legacy standalone cas-api service, set:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export TDX_CAS_LEGACY_ENDPOINT=1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: cas-api's data was never migrated to cdp-api, so composable audiences created against one host are invisible from the other — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas list"]}," will show a different set of audiences depending on which endpoint is active."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"commands","__idx":2},"children":["Commands"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"discovery","__idx":3},"children":["Discovery"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#list"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List composable audiences"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#desc"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Describe a composable audience"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"yaml-sync","__idx":4},"children":["YAML Sync"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pull"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pull"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pull audience + segments to YAML files"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#validate"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["validate"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validate composable audience YAML files locally"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#push"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["push"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Push YAML files to CAS API"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"operations","__idx":5},"children":["Operations"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#preview"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preview"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Preview composable segment query on CDW"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sg-list"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sg list"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List composable segments for an audience"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sg-push"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sg push"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create, update, or delete a single child segment, standalone"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"typical-usage","__idx":6},"children":["Typical Usage"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1. List composable audiences\ntdx cas list\n\n# 2. Pull audience and all segments to YAML files\ntdx cas pull \"Customer360 Snowflake\"\n# Creates: cas/customer360-snowflake.yml (audience)\n#          cas/high-value-customers.yml (segment)\n#          cas/Marketing/newsletter-subs.yml (segment in folder)\n\n# 3. Edit YAML files locally\n\n# 4. Validate before pushing (optional — push validates too, but this is faster to iterate on)\ntdx cas validate ./cas/\n\n# 5. Push changes back to CAS API\ntdx cas push ./cas/\n\n# 6. Preview a segment query on the CDW\ntdx cas preview \"High-Value Customers\" --audience \"Customer360 Snowflake\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"session-context","__idx":7},"children":["Session Context"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a default composable audience to avoid repeating the name:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx use cas \"Customer360 Snowflake\"\n\n# Now these commands use the context:\ntdx cas sg list           # Lists segments for \"Customer360 Snowflake\"\ntdx cas desc              # Describes \"Customer360 Snowflake\"\ntdx cas pull              # Pulls \"Customer360 Snowflake\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-it-works","__idx":8},"children":["How It Works"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Composable Audiences"]}," define customer profiles from tables in your own data warehouse. Unlike Complete CDP audiences (which copy data into Treasure AI), composable audiences query your CDW directly — zero data movement."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each composable audience has:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["master table"]}," (the primary customer table in your CDW)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Attributes"]}," (additional columns joined from other tables)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behaviors"]}," (time-series event tables for behavioral segmentation)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Segments"]}," (filtered subsets using rules/conditions)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Activations"]}," (exports from segments to external systems)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"yaml-format","__idx":9},"children":["YAML Format"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"audience-yaml","__idx":10},"children":["Audience YAML"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"name: Customer360 Snowflake\ndescription: Customer data from Snowflake\ntimezone: America/New_York\nallow_activation_behavior: true # optional, default false\nmax_activation_behavior_row: 5 # optional, 1–20\nmaster:\n  connection: '204' # Snowflake: a zero-copy config ID (see note below), not a connector name\n  schema: customer_data\n  table: customers\n  key_column: cdp_customer_id\n  # catalog: my-gcp-project   # required for Databricks/BigQuery connections; unused for Snowflake\nattributes:\n  - name: email_info\n    connection: '204' # Snowflake: a zero-copy config ID (see note below), not a connector name\n    schema: customer_data\n    table: customers\n    join:\n      table_key: cdp_customer_id\n      master_key: cdp_customer_id\n    columns:\n      - name: email\n        type: string\n        column: email_address\nbehaviors:\n  - name: purchase_events\n    connection: '204' # Snowflake: a zero-copy config ID (see note below), not a connector name\n    schema: events\n    table: purchase_history\n    join:\n      table_key: customer_id\n      master_key: cdp_customer_id\n    time_column: event_timestamp\n    columns:\n      - name: product_id\n        type: string\n        column: product_sku\n      - name: amount\n        type: number\n        column: purchase_amount\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connection"]}," differs by platform:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Snowflake"]},": a federated query config (zero-copy config) ID — a raw ID like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"204\""]},", never a connector name. This resource is never listed by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx connections"]},", so there's no name to look up; run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas pull"]}," on an existing Snowflake composable audience to see the exact ID your account uses."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databricks/BigQuery"]},": a connector name or ID from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx connections"]}," (also requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]},"), or an authentication ID used to connect to the CDW."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"segment-yaml","__idx":11},"children":["Segment YAML"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"type: composable_segment\nname: High-Value Customers\ndescription: Customers with > $1000 in purchases\nfolder: Marketing/Campaigns\nrule:\n  type: And\n  conditions:\n    - type: Behavior\n      behavior: purchase_events\n      aggregation: Sum\n      column: amount\n      operator: GreaterThanOrEqual\n      value: 1000\nactivations:\n  - name: Export to Marketing\n    connection: salesforce-connection\n    connector_config:\n      object: Contact\n    columns: # required: either `columns` (as here) or `all_columns: true`\n      - name: email\n        type: string\n    schedule:\n      type: daily # none | daily | weekly | monthly\n      timezone: UTC\n      repeat_unit: daily # optional finer-grained repeat control\n      repeat_frequency: 1\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"command-reference","__idx":12},"children":["Command Reference"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"list","__idx":13},"children":["list"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List all composable audiences."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas list [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output as JSON"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--jsonl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output as JSON Lines"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"desc","__idx":14},"children":["desc"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Describe a composable audience showing master table, attributes, and behaviors."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas desc [name]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Uses session context if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," is omitted (set via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use cas"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas pull"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pull","__idx":15},"children":["pull"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pull a composable audience and all its segments/activations to local YAML files."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas pull [name] [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dir <dir>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Target directory for YAML files (default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["./cas/<audience-name>/"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show what would be done without writing files"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Uses session context if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," is omitted. Also sets ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["composable_audience"]}," context for subsequent commands."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The pull command shows diffs for changed files and prompts for confirmation before writing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"validate","__idx":16},"children":["validate"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Validate composable audience YAML files locally, without contacting the CAS API."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas validate [target] [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--verbose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Also print each valid file (by default only files with errors/warnings are shown)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}," can be a file or directory. If omitted, uses the session context set by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use cas"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Checks performed:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["YAML shape"]},": required fields, types, and enum values (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["master.schema"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["master.table"]},", attribute/behavior ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Semantic rules"]},": duplicate attribute/behavior names, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}," required for Databricks/BigQuery master connections, behaviors need ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all_columns: true"]}," or a non-empty ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["columns"]}," list"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connection platform/catalog"]}," (only when the value resolves to a registered connector): whether its platform is supported, and — for Databricks/BigQuery master connections — that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}," is set. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connection:"]}," value is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," required to appear in your account's connector list (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx connections"]},") — for Snowflake it's typically a federated query config (zero-copy config) ID, and for Databricks/BigQuery it's typically an authentication used to connect to the CDW; both are separate resources from connectors, with their own ID namespaces. An unresolved connection is expected and not flagged."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Snowflake connection misuse"]},": a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connection:"]}," value that matches a ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["registered connector name"]}," on a Snowflake master/attribute/behavior is always an error — Snowflake needs a raw zero-copy config ID instead (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#yaml-format"},"children":["YAML Format"]}," above), and resolving a connector name there would silently send the wrong ID and fail with a confusing error at push time."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is the same validation ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas push"]}," runs as a pre-flight check before touching the API — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cas validate"]}," exists as a faster local iteration loop, not a separate set of rules. It does ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," verify that TD can actually connect to your CDW or that the referenced schema/table/columns exist there — that only happens server-side during an actual ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas push"]}," (there is no standalone endpoint for a live connectivity check). Composable segment YAML (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: composable_segment"]},") files are detected but not deeply validated by this command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"push","__idx":17},"children":["push"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Push local YAML files to the CAS API."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas push [target] [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show what would be done without making changes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-y, --yes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Skip the confirmation prompt (for CI/CD and other non-interactive usage)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Allow removing audience attributes/behaviors not in local YAML (disabled by default — see below)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}," can be a file or directory. If omitted, pushes from the current directory. Audience files are pushed first, then segments and activations."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Push first validates all composable audience YAML files (same checks as ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#validate"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas validate"]}]},") and aborts before making any API calls if any file has errors. It then creates a new Composable Parent Segment when no audience with that name exists, or updates the existing one — showing a preview of what would be created/updated first, then prompting for confirmation before writing (pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--yes"]}," to skip the prompt). In a non-interactive session (e.g. CI/CD, no TTY), push refuses outright with an error unless ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--yes"]}," is passed — it never silently assumes confirmation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A target can only contain ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["one"]}," composable audience YAML file per push — every segment/activation file in the target attaches to that one audience. If more than one audience file is found, push aborts and lists the conflicting files rather than guessing which audience the segments belong to."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a segment's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["folder:"]}," path doesn't exist yet (e.g. the first push of a brand-new audience), push creates the missing folder(s) automatically, parent folders first."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Updating an existing audience replaces its full ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attributes"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["behaviors"]}," set, not a merge."]}," The backend does a destroy-and-rebuild of the whole collection whenever the request includes an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attributes"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["behaviors"]}," key, so an attribute/behavior on the server but missing from the local YAML would otherwise be silently deleted. Push detects this (\"drift\") and refuses before writing anything, naming what would be removed — pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}," to authorize the removal."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Renaming an attribute/behavior (same source ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["column"]},", new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},") is detected as a rename, not a removal — it doesn't need ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]},"."]}," Because the backend always rebuilds the whole collection on update, a rename can't be applied truly in place: the attribute/behavior gets a new server-side id every time. Push output reports this explicitly, e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Renamed attribute: \"email\" → \"email_updated\" (server id changed 10095 → 10096)"]}," — if anything else (an activation, an external system) is keyed on the old id, update it there too."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"preview","__idx":18},"children":["preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Preview a composable segment query by running it on the CDW."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas preview <segment_name> [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--audience <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Composable audience name (or use session context)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sg-list","__idx":19},"children":["sg list"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List composable segments for an audience."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas sg list [audience_name]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["audience_name"]}," is omitted, uses the session context set by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use cas"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sg-push","__idx":20},"children":["sg push"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create or update a single composable child segment, standalone — without needing a co-located audience YAML file in the same directory."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas sg push <file> [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--audience <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Composable audience name (or use session context)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show what would be done without making changes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-y, --yes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Skip the confirmation prompt (for CI/CD and other non-interactive usage)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delete the named segment instead of creating/updating it (single segment only — see below; disabled by default)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Unlike ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#push"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["push"]}]},", which requires an audience YAML file in the same target to resolve the parent, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sg push"]}," resolves the parent audience by name — via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--audience <name>"]}," or the session context set by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use cas"]},". It creates a new child segment when none exists under that audience (matched by name), or updates the existing one — same idempotent-by-name behavior as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["push"]},". Repeat pushes of the same segment file update in place rather than creating a duplicate."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}," deletes exactly the one segment named in the file's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name:"]}," field — single-named-target only, not a directory/bulk prune."]}," This is a different meaning from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["push"]},"'s own ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}," (which authorizes removing audience attributes/behaviors detected as drift) — each ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--delete"]}," is scoped to its own command's domain. Passing a directory instead of a file is rejected outright, not silently guessed at. The confirmation prompt names the segment and audience explicitly (not the generic \"Push N change(s)?\" prompt) since this is a destructive, irreversible action."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx cas sg push high-value-customers.yml --audience \"Customer360 Snowflake\" --delete\ntdx cas sg push high-value-customers.yml --audience \"Customer360 Snowflake\" --delete --dry-run\ntdx cas sg push high-value-customers.yml --audience \"Customer360 Snowflake\" --delete -y\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cas-vs-complete-cdp","__idx":21},"children":["CAS vs Complete CDP"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Aspect"},"children":["Aspect"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Complete ( tdx ps / tdx sg )"},"children":["Complete (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx ps"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx sg"]},")"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Composable ( tdx cas )"},"children":["Composable (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx cas"]},")"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data location"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TD PlazmaDB"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer's Snowflake/Databricks/BigQuery"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Source reference"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["database"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connection"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query engine"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Presto/Trino on TD"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct SQL on CDW"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Activations"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["syndications"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["composable_activations"]}," with CDW-specific export"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API prefix"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/audiences/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/entities/segments/"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/composable_audiences/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/entities/composable_segments/"]}]}]}]}]}]}]},"headings":[{"value":"CAS Commands","id":"cas-commands","depth":1},{"value":"Backend endpoint","id":"backend-endpoint","depth":2},{"value":"Commands","id":"commands","depth":2},{"value":"Discovery","id":"discovery","depth":3},{"value":"YAML Sync","id":"yaml-sync","depth":3},{"value":"Operations","id":"operations","depth":3},{"value":"Typical Usage","id":"typical-usage","depth":2},{"value":"Session Context","id":"session-context","depth":2},{"value":"How It Works","id":"how-it-works","depth":2},{"value":"YAML Format","id":"yaml-format","depth":2},{"value":"Audience YAML","id":"audience-yaml","depth":3},{"value":"Segment YAML","id":"segment-yaml","depth":3},{"value":"Command Reference","id":"command-reference","depth":2},{"value":"list","id":"list","depth":3},{"value":"desc","id":"desc","depth":3},{"value":"pull","id":"pull","depth":3},{"value":"validate","id":"validate","depth":3},{"value":"push","id":"push","depth":3},{"value":"preview","id":"preview","depth":3},{"value":"sg list","id":"sg-list","depth":3},{"value":"sg push","id":"sg-push","depth":3},{"value":"CAS vs Complete CDP","id":"cas-vs-complete-cdp","depth":2}],"frontmatter":{"seo":{"title":"tdx cas - Composable Audience Studio | Treasure AI","description":"Manage Composable Audience Studio (CAS) resources. Zero-copy CDP audiences on Snowflake, Databricks, and BigQuery.","image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"}},"lastModified":"2026-08-21T08:43:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/treasure-code/commands/cas","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}