Skip to content
Last updated

Incremental Activationスタンドアロンワークフロー

Incremental Activationはベータ版リリースです。詳細については、カスタマーサクセス担当者にお問い合わせください。

このページでは、Audience Studioを使用せずにスタンドアロンワークフローとしてIncremental Activationを使用する方法を説明します。これにより、スケジュールベースで任意のTDテーブルから直接差分エクスポートを実行できます。

概要

スタンドアロンワークフローとしてIncremental Activationを実行する場合、次のことができます。

  • 任意のTDテーブルから差分の変更をエクスポート(セグメントデータだけでなく)
  • 送信先への定期的な差分エクスポートをスケジュール
  • Audience StudioのActivationフレームワーク外でデータを処理

主な違い: すべてのパラメータは、Audience Studioによって自動的に設定されないため、ワークフローで明示的に設定する必要があります。

必須の追加パラメータ

スタンドアロンモードでは、次の追加パラメータを設定する必要があります。

パラメータ説明
activation_actions_dbソースTDデータベース"my_database"
activation_actions_tableソーステーブル名"customer_profiles"
result_connection_nameコネクタ認証名"my_snowflake_connection"
result_connection_settingsコネクタ設定オブジェクト以下の例を参照

スタンドアロンワークフローテンプレート

timezone: "UTC"
_export:
  params:
    # API endpoint - change based on your TD site
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"

    # Unique identifier column
    id_key: "customer_id"

    # Columns to check for changes
    delta_keys: ["email", "status", "tier"]

    # Delta mappings
    activation_mappings: [
      {
        "delta_status": "new",
        "connector_field": "mode",
        "connector_field_value": "append"
      },
      {
        "delta_status": "updated",
        "connector_field": "mode",
        "connector_field_value": "append"
      }
    ]

    # REQUIRED: Standalone mode parameters
    activation_actions_db: "my_database"
    activation_actions_table: "customer_profiles"
    result_connection_name: "my_snowflake_connection"
    result_connection_settings:
      type: "snowflake"
      database: "MARKETING_DB"
      schema: "PUBLIC"
      table: "CUSTOMER_SEGMENTS"
      mode: "append"

# Fetch and execute incremental activation workflow
+fetch_incremental_activation_wf:
  http_call>: "${params.api_endpoint}/integration_workflow/workflows/incremental_activation/fetch"
  method: POST
  headers:
    - Authorization: ${secret:td.apikey}
    - Content-Type: "application/json"
  content_type_override: application/x-yaml
  content: |
    {
      "database": "${params.activation_actions_db}",
      "source_table": "${params.activation_actions_table}",
      "id_key": "${params.id_key}",
      "delta_keys": ${JSON.stringify(params.delta_keys)},
      "activation_mappings": ${JSON.stringify(params.activation_mappings)},
      "result_connection_settings": ${JSON.stringify(params.result_connection_settings)},
      "result_connection_name": "${params.result_connection_name}"
    }
  retry: true

コネクタ設定例

Snowflake

result_connection_settings:
  type: "snowflake"
  database: "MARKETING_DB"
  schema: "PUBLIC"
  table: "CUSTOMER_SEGMENTS"
  mode: "append"

MySQL

result_connection_settings:
  type: "mysql"
  database: "marketing"
  table: "customer_segments"
  mode: "append"

PostgreSQL

result_connection_settings:
  type: "postgresql"
  database: "marketing"
  schema: "public"
  table: "customer_segments"
  mode: "append"

Google Sheets

result_connection_settings:
  type: "google_sheets"
  spreadsheet_id: "1ABC...xyz"
  sheet_name: "Customer List"
  mode: "replace"

セットアップ手順

  1. TD Data Workbench > Workflowsで新しいユーザー定義ワークフローを作成します
  2. 上記のスタンドアロンテンプレートをコピー&ペーストします
  3. すべての必須パラメータを設定します:
    • TDサイトに合わせてapi_endpointを設定
    • 一意の識別子カラムにid_keyを設定
    • 追跡したいカラムにdelta_keysを設定
    • activation_actions_dbactivation_actions_tableを設定
    • 送信先に合わせてresult_connection_settingsを設定
    • 認証にresult_connection_nameを設定
  4. ワークフローを保存します
  5. 手動で実行するか、ワークフローをスケジュールします

スケジューリング

スケジュールに従ってワークフローを実行するには、スケジュール設定を追加します。

schedule:
  daily>: 02:00:00  # Run daily at 2 AM UTC

timezone: "UTC"
_export:
  params:
    # ... rest of configuration

ユースケース

日次顧客プロファイル同期

毎晩変更された顧客プロファイルのみをデータウェアハウスにエクスポート:

schedule:
  daily>: 01:00:00

_export:
  params:
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"
    id_key: "customer_id"
    delta_keys: ["email", "phone", "address", "tier"]
    activation_actions_db: "customer_data"
    activation_actions_table: "unified_profiles"
    # ... connector settings

時間単位の商品カタログ更新

商品カタログの変更をeコマースプラットフォームに同期:

schedule:
  hourly>: 00

_export:
  params:
    api_endpoint: "https://integrations-gateway.us01.treasuredata.com"
    id_key: "product_id"
    delta_keys: ["price", "stock_quantity", "availability"]
    activation_actions_db: "product_catalog"
    activation_actions_table: "products"
    # ... connector settings

Activation Actionモードとの違い

側面Activation Actionモードスタンドアロンモード
トリガーAudience Studioセグメントactivationワークフローのスケジュールまたは手動実行
データソースセグメントシンジケーションテーブル(自動)任意のTDテーブル(手動設定)
自動設定されるパラメータあり(activation_actions_dbactivation_actions_table、コネクタ設定)なし(すべてのパラメータを設定する必要があります)
ユースケースセグメントからのマーケティングactivation任意のテーブルからのスケジュール済み差分エクスポート

次のステップ

関連トピック