rt-config
БесплатноБез исполняемых скриптовНе проверенConfigure RT 2.0 (Real-Time Personalization) for parent segments including event tables, key events, RT attributes, and ID stitching using tdx ps rt commands…
от treasure-data★ 23 звезды на GitHubОб этом скилле
RT 2.0 Configuration
Configure real-time personalization for parent segments: event tables, RT attributes, batch attributes, and ID stitching.
Prerequisites
tdxCLI installed and authenticated- Parent segment created in Data Workbench
- RT 2.0 enabled by CSM (contact CSM if not enabled)
- Streaming event tables configured and receiving data
Quick Start
# Check RT status
tdx ps view <parent_segment_id> --json
# Initialize configuration template
tdx ps pz init <parent_segment_id> -o rt_config.yaml
# Validate configuration
tdx ps rt validate rt_config.yaml
# Push configuration
tdx ps push rt_config.yaml
Configuration Structure
parent_segment_id: "394649"
# Event tables to track
events:
- name: "page_view"
database: "events_db"
table: "web_events"
filter:
field: "td_path"
pattern: "^/pageview/"
- name: "purchase"
database: "events_db"
table: "commerce_events"
filter:
field: "event_type"
pattern: "^purchase$"
# Real-time attributes
attributes:
# Single - Latest value
- name: "last_product_viewed"
type: "single"
source_event: "page_view"
source_field: "product_id"
aggregation: "last"
sensitivity: "non-sensitive"
# List - Array with expiry
- name: "viewed_products_30d"
type: "list"
source_event: "page_view"
source_field: "product_id"
aggregation: "distinct_list"
max_items: 50
expiry_days: 30
sensitivity: "non-sensitive"
# Counter - Event counts
- name: "purchase_count_7d"
type: "counter"
source_event: "purchase"
window_duration: "7d"
aggregation: "count"
sensitivity: "non-sensitive"
# Imported batch - From parent segment
- name: "customer_tier"
type: "imported_batch"
source: "parent_segment"
sensitivity: "non-sensitive"
# ID stitching
id_stitching:
primary_key: "td_client_id"
stitching_keys:
- name: "td_client_id"
exclude_regex: "^test_.*"
- name: "email"
exclude_regex: ".*@test\\.com$"
- name: "user_id"
ext_lookup_key: "email"
Attribute Types
Single Attributes
Latest or first value from event field:
- name: "last_page_url"
type: "single"
source_event: "page_view"
source_field: "url"
aggregation: "last" # or "first", "sum", "min", "max"
List Attributes
Distinct values with expiry:
- name: "browsed_categories"
type: "list"
source_event: "page_view"
source_field: "category"
aggregation: "distinct_list"
max_items: 100
expiry_days: 60
Counter Attributes
Event counts over time window:
- name: "clicks_24h"
type: "counter"
source_event: "click"
window_duration: "24h" # 24h, 7d, 30d
aggregation: "count" # or "sum" with source_field
Imported Batch Attributes
From parent segment (updated on schedule):
- name: "total_lifetime_value"
type: "imported_batch"
source: "parent_segment"
sensitivity: "non-sensitive"
Event Filters
Filter events by field pattern:
events:
- name: "add_to_cart"
database: "events_db"
table: "web_events"
filter:
field: "td_path"
pattern: "^/cart/add"
Common patterns:
^/pageview/- Starts with /pageview/^purchase$- Exactly "purchase".*product.*- Contains "product"
ID Stitching
id_stitching:
primary_key: "td_client_id" # Unique, stable identifier
stitching_keys:
- name: "td_client_id"
exclude_regex: "^test_.*" # Exclude test IDs
- name: "email"
exclude_regex: ".*@example\\.com$"
- name: "user_id"
ext_lookup_key: "email" # External lookup (optional)
Requirements:
primary_keymust be institching_keys- All keys should exist in event tables
- Use
exclude_regexto filter invalid values
View Configuration
# View current RT config
tdx ps view <parent_segment_id> --json
# Check event tables
tdx ps view <parent_segment_id> --json | jq '.realtime_config.events'
# List RT attributes (API)
tdx api "/audiences/<parent_segment_id>/realtime_attributes" --type cdp
# List key events (API)
tdx api "/audiences/<parent_segment_id>/realtime_key_events" --type cdp
Update Configuration
Update via API (no YAML update available yet):
# Update event tables
tdx api "/audiences/<parent_segment_id>/realtime_setting" --type cdp --method PATCH --data '{
"event_tables": [
{
"database": "events_db",
"table": "web_events",
"event_name": "page_view",
"filter_field": "td_path",
"filter_pattern": "^/pageview/"
}
],
"key_columns": {
"primary_key": "td_client_id",
"stitching_keys": ["td_client_id", "email", "user_id"]
}
}'
# Add RT attribute
tdx api "/audiences/<parent_segment_id>/realtime_attributes" --type cdp --method POST --data '{
"name": "last_product_viewed",
"type": "single",
"source_event": "page_view",
"source_field": "product_id",
"aggregation": "
Установить rt-config в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rt-config?
Configure RT 2.0 (Real-Time Personalization) for parent segments including event tables, key events, RT attributes, and ID stitching using tdx ps rt commands or API
Как установить скилл rt-config?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rt-config запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic