Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cas

БесплатноБез исполняемых скриптовНе проверен

Manages Composable Audience Studio (CAS) zero-copy audiences using `tdx cas` commands — audiences that query customer Cloud Data Warehouses (Snowflake…

treasure-dataот treasure-data★ 23 звезды на GitHub

Об этом скилле

tdx CAS - Composable Audience Studio Management

Composable audiences never copy data into Treasure Data — they query the customer's own Snowflake/Databricks/BigQuery directly. This is the main reason CAS YAML differs from standard tdx ps/tdx sg YAML: every table reference needs a connection, and child segment rules use a different condition shape.

Pushing composable audiences safely — read this first

All CAS writes go through the typed tdx cas commands. Never create or update a composable audience/segment/activation with raw tdx api HTTP calls — the request shapes below have real footguns that the typed command handles for you.

  • Audience updates are a full replace of attributes/behaviors, not a merge. If you push a YAML that's missing an attribute/behavior the server currently has, tdx cas push refuses before writing anything and names exactly what would be removed. This is intentional — it is not a bug to work around. Either update the local YAML to include the missing field (pull first if it might be stale: tdx cas pull), or, if removing it is genuinely intended, re-run with --delete. Never assume --delete is safe to add reflexively just to make the refusal go away — confirm with the user first if you didn't write the YAML yourself.
  • Renaming an attribute/behavior (same source schema/table/column, new name) does NOT need --delete. tdx cas push detects this as a rename, not a removal, and applies it directly. Under the hood the backend recreates the attribute/behavior with a new server-side id every time (it can't rename in place) — push output reports this explicitly, e.g. Renamed attribute: "email" → "email_updated" (server id changed 10095 → 10096). If anything else is keyed on that id (an activation, an external system), it needs to be updated separately; tdx cas push has no way to know about or update such references.
  • Repeat pushes are idempotent by name. Pushing the same audience/segment/activation name again updates the existing one — it does not create a duplicate. There's no need to check existence yourself before pushing.
  • No confirmation prompt on drift or errors. Both the drift refusal above and any other push failure exit non-zero with a specific message (never a generic "push failed"). Read the message — it names the exact field/attribute/behavior involved.
  • If a typed command seems not to exist for what you need, ask the user — do not fall back to raw tdx api.

Core Commands

tdx cas list                              # List composable audiences
tdx cas desc <name>                       # Describe a composable audience
tdx cas pull <name> [--dir <dir>]         # Pull audience + segments to YAML
tdx cas validate <file_or_dir>            # Validate YAML locally (no API calls)
tdx cas push <file_or_dir>                # Preview, confirm, then push
tdx cas push <file_or_dir> --dry-run      # Preview only, no writes
tdx cas push <file_or_dir> -y             # Skip confirmation (CI/CD)
tdx cas push <file_or_dir> --delete       # Also apply a detected attribute/behavior removal
tdx cas sg push <segment_file> --audience <name>  # Push one child segment standalone
tdx cas sg push <segment_file> --audience <name> --delete  # Delete that one named segment
tdx cas preview <segment_name> --audience <name>  # Preview a segment query on the CDW
tdx cas journey list [pattern] --audience <name>  # List journeys of a composable audience
tdx cas journey view <name> --audience <name>     # Show a composable journey's details
tdx cas journey pull [name] --audience <name> [--dir <dir>]  # Pull journeys to YAML
tdx cas journey push [file] --audience <name> [--dir <dir>]  # Push journeys from YAML

tdx cas push always previews first (dry-run pass showing create/update counts and any drift), prompts for confirmation on a real write unless -y, and refuses outright in non-interactive mode without -y.

Audience YAML

name: Customer360 Snowflake
description: Customer data from Snowflake
timezone: UTC
master:
  connection: '<federated_query_config_id>'   # Snowflake: raw zero-copy config ID, not a connector name
  schema: PUBLIC
  table: CUSTOMERS
  key_column: CDP_CUSTOMER_ID
attributes:
  - name: email
    connection: '<federated_query_config_id>'
    schema: PUBLIC
    table: CUSTOMERS
    join:
      table_key: CDP_CUSTOMER_ID
      master_key: CDP_CUSTOMER_ID
    column: EMAIL
    type: string          # Must match the real CDW column type — see Connection resolution below
behaviors:
  - name: purchases
    connection: '<federated_query_config_id>'
    schema: PUBLIC
    table: PURCHASE_HISTORY
    join:
      table_key: CDP_CUSTOMER_ID
      master_key: CDP_CUSTOMER_ID
    time_column: TIMESTAMP
    columns:                # required: this OR `all_columns: true`
      - name: amount
        type: number
        column: AMOUNT

Attribute/behavior type must match the real CDW column type (`strin

Полный SKILL.md на GitHub

Установить cas в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SKILL.meta.ymltest.yml

FAQ

Что делает скилл cas?

Manages Composable Audience Studio (CAS) zero-copy audiences using `tdx cas` commands — audiences that query customer Cloud Data Warehouses (Snowflake, Databricks, BigQuery) directly instead of copying data into Treasure Data. Covers audience/attribute/behavior YAML, the composable segment rule DSL (distinct from standard `tdx sg` rules), connection resolution per CDW platform, push safety (idempotent create/update, drift detection, `--delete` for both audience attribute/behavior drift and single-named-target child segment deletion), and composable journeys (`tdx cas journey list/view/pull/push` — composable constraints like account enablement, one version per journey, and no custom entry criteria after stage 1). Use when creating, updating, or deleting composable parent segments, composable child segments, or composable activations, managing journeys on a composable audience, or when a task mentions zero-copy, Snowflake/Databricks/BigQuery audiences, or Composable Audience Studio.

Как установить скилл cas?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cas запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cas с