{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Step 4: Create the Parent Segment Configuration File","description":"Define the JSON configuration for a Composable Parent Segment on Databricks, including master table, attributes, and behaviors.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"step-4-create-the-parent-segment-configuration-file","__idx":0},"children":["Step 4: Create the Parent Segment Configuration File"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Parent Segment configuration is a JSON file that tells Composable Audience Studio which Databricks tables and columns to use. Following the Parent Segment data model, it defines:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Master"]}," -- points to the single Customers table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Attributes"]}," -- columns from the Customers table available for segmentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behaviors"]}," -- separate event/activity tables linked to the Customers table"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"json-structure","__idx":1},"children":["JSON Structure"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"name\": \"<parent_segment_name>\",\n  \"description\": \"<description>\",\n  \"timezone\": \"UTC\",\n  \"kind\": \"composable\",\n  \"isComposable\": true,\n  \"master\": { ... },\n  \"attributes\": [ ... ],\n  \"behaviors\": [ ... ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"top-level-fields","__idx":2},"children":["Top-Level Fields"]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$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":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name for the Parent Segment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Description of the Parent Segment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timezone"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timezone for time-based operations (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UTC"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["composable"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isComposable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["master"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customers table definition"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attributes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of attribute column definitions from the Customers table"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["behaviors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of Behaviors table definitions"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"master-customers-table-definition","__idx":3},"children":["Master (Customers Table) Definition"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["master"]}," object points to your single Customers table. This is the central profile table that all attributes come from and all behaviors link to."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Key Difference from Snowflake"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Databricks uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}," (instead of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["federatedQueryConfigId"]},") and requires a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}," field for Unity Catalog."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"master\": {\n  \"name\": \"customers\",\n  \"connectionId\": \"341079\",\n  \"catalog\": \"cas_demo_east1\",\n  \"schema\": \"public\",\n  \"table\": \"customers\",\n  \"keyColumn\": \"cdp_customer_id\"\n}\n","lang":"json"},"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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name for the Customers table"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID from your Databricks authentication configuration (Step 3)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks Unity Catalog name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks schema name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks table name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keyColumn"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier column (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdp_customer_id"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"attribute-definition","__idx":4},"children":["Attribute Definition"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each attribute maps a column from the Customers table to a segmentation property in CAS. Since all attributes reside in the Customers table, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tableKey"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["masterKey"]}," fields all reference the same Customers table and its key column."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"1\",\n  \"name\": \"email\",\n  \"connectionId\": \"341079\",\n  \"catalog\": \"cas_demo_east1\",\n  \"schema\": \"public\",\n  \"table\": \"customers\",\n  \"tableKey\": \"cdp_customer_id\",\n  \"masterKey\": \"cdp_customer_id\",\n  \"column\": \"email\",\n  \"type\": \"string\",\n  \"createdAt\": \"2025-11-21T06:05:04.037Z\",\n  \"updatedAt\": \"2025-11-21T06:05:04.037Z\"\n}\n","lang":"json"},"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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier for this attribute (sequential, starting from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name in the CAS segment builder"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks authentication ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks Unity Catalog name (same as master)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks schema (same as master)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be the Customers table name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tableKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Key column in the Customers table (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdp_customer_id"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["masterKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tableKey"]}," since attributes come from the Customers table"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["column"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Column name in the Customers table containing the attribute value"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data type: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 timestamp (use current time)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 timestamp (use current time)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Key Point"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All attributes reference the same Customers table. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}," field for every attribute must match the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["master.table"]}," value."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"behavior-definition","__idx":5},"children":["Behavior Definition"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each behavior maps a separate Behaviors table to CAS. The Behaviors table is linked to the Customers table via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdp_customer_id"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"1\",\n  \"name\": \"behavior_pageviews\",\n  \"connectionId\": \"341079\",\n  \"catalog\": \"cas_demo_east1\",\n  \"schema\": \"public\",\n  \"table\": \"behavior_pageviews\",\n  \"tableKey\": \"cdp_customer_id\",\n  \"masterKey\": \"cdp_customer_id\",\n  \"timeColumn\": \"time\",\n  \"createdAt\": \"2025-11-21T06:05:04.056Z\",\n  \"updatedAt\": \"2025-11-21T06:05:04.056Z\",\n  \"columnMapping\": [\n    {\n      \"name\": \"td_url\",\n      \"type\": \"string\",\n      \"cdwColumn\": \"td_url\"\n    },\n    {\n      \"name\": \"td_title\",\n      \"type\": \"string\",\n      \"cdwColumn\": \"td_title\"\n    }\n  ]\n}\n","lang":"json"},"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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier for this behavior"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name in CAS"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks authentication ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks Unity Catalog name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks schema"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks Behaviors table name (separate from the Customers table)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tableKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Column in the Behaviors table linking to the Customers table (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdp_customer_id"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["masterKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Key column in the Customers table (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdp_customer_id"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timeColumn"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Column containing the event timestamp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 timestamp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 timestamp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["columnMapping"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of event column definitions"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each entry in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["columnMapping"]},":"]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name for the column in CAS"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data type: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cdwColumn"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Actual column name in the Databricks Behaviors table"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-differences-snowflake-vs-databricks","__idx":6},"children":["Configuration Differences: Snowflake vs. Databricks"]},{"$$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":"Snowflake"},"children":["Snowflake"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Databricks"},"children":["Databricks"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connection ID field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["federatedQueryConfigId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionId"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Catalog field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["catalog"]}," (required for Unity Catalog)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RSA key pair"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Service principal PAT"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connection setup"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Zero-Copy > Snowflake"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integration Hub > Authentications > Databricks"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-example","__idx":7},"children":["Complete Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example defines a \"Retail Composable Audience\" with 12 customer attributes from the Customers table and 1 Behaviors table:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"name\": \"Retail Composable Audience\",\n  \"description\": \"Description of the composable audience\",\n  \"timezone\": \"UTC\",\n  \"kind\": \"composable\",\n  \"isComposable\": true,\n  \"master\": {\n    \"name\": \"customers\",\n    \"connectionId\": \"341079\",\n    \"catalog\": \"cas_demo_east1\",\n    \"schema\": \"public\",\n    \"table\": \"customers\",\n    \"keyColumn\": \"cdp_customer_id\"\n  },\n  \"attributes\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"email\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"email\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.037Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.037Z\"\n    },\n    {\n      \"id\": \"2\",\n      \"name\": \"address\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"address\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.044Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.044Z\"\n    },\n    {\n      \"id\": \"3\",\n      \"name\": \"aov\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"aov\",\n      \"type\": \"number\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"4\",\n      \"name\": \"city\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"city\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"5\",\n      \"name\": \"country\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"country\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"6\",\n      \"name\": \"first_name\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"first_name\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"7\",\n      \"name\": \"last_name\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"last_name\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"8\",\n      \"name\": \"gender\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"gender\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"9\",\n      \"name\": \"ltv\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"ltv\",\n      \"type\": \"number\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"10\",\n      \"name\": \"membership_tier\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"membership_tier\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"11\",\n      \"name\": \"next_best_channel\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"next_best_channel\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    },\n    {\n      \"id\": \"12\",\n      \"name\": \"next_best_offer\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"customers\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"column\": \"next_best_offer\",\n      \"type\": \"string\",\n      \"createdAt\": \"2025-11-21T06:05:04.053Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.053Z\"\n    }\n  ],\n  \"behaviors\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"behavior_pageviews\",\n      \"connectionId\": \"341079\",\n      \"catalog\": \"cas_demo_east1\",\n      \"schema\": \"public\",\n      \"table\": \"behavior_pageviews\",\n      \"tableKey\": \"cdp_customer_id\",\n      \"masterKey\": \"cdp_customer_id\",\n      \"timeColumn\": \"time\",\n      \"createdAt\": \"2025-11-21T06:05:04.056Z\",\n      \"updatedAt\": \"2025-11-21T06:05:04.056Z\",\n      \"columnMapping\": [\n        {\n          \"name\": \"td_url\",\n          \"type\": \"string\",\n          \"cdwColumn\": \"td_url\"\n        },\n        {\n          \"name\": \"td_title\",\n          \"type\": \"string\",\n          \"cdwColumn\": \"td_title\"\n        }\n      ]\n    }\n  ]\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Step 4: Create the Parent Segment Configuration File","id":"step-4-create-the-parent-segment-configuration-file","depth":1},{"value":"JSON Structure","id":"json-structure","depth":2},{"value":"Top-Level Fields","id":"top-level-fields","depth":2},{"value":"Master (Customers Table) Definition","id":"master-customers-table-definition","depth":2},{"value":"Attribute Definition","id":"attribute-definition","depth":2},{"value":"Behavior Definition","id":"behavior-definition","depth":2},{"value":"Configuration Differences: Snowflake vs. Databricks","id":"configuration-differences-snowflake-vs-databricks","depth":2},{"value":"Complete Example","id":"complete-example","depth":2}],"frontmatter":{"seo":{"title":"Step 4: Create the Parent Segment Configuration File","description":"Define the JSON configuration for a Composable Parent Segment on Databricks, including master table, attributes, and behaviors."}},"lastModified":"2026-04-13T00:18:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/composable-cdp/databricks/create-parent-segment-config","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}