Skip to content

Step 4: Create the Parent Segment Configuration File

The Parent Segment configuration is a JSON file that tells Composable Audience Studio which Snowflake tables and columns to use. Following the Parent Segment data model, it defines:

  • Master -- points to the single Customers table
  • Attributes -- columns from the Customers table available for segmentation
  • Behaviors -- separate event/activity tables linked to the Customers table

JSON Structure

{
  "name": "<parent_segment_name>",
  "description": "<description>",
  "timezone": "UTC",
  "kind": "composable",
  "isComposable": true,
  "master": { ... },
  "attributes": [ ... ],
  "behaviors": [ ... ]
}

Top-Level Fields

FieldTypeRequiredDescription
namestringYesDisplay name for the Parent Segment
descriptionstringYesDescription of the Parent Segment
timezonestringYesTimezone for time-based operations (e.g., UTC)
kindstringYesMust be composable
isComposablebooleanYesMust be true
masterobjectYesCustomers table definition
attributesarrayYesArray of attribute column definitions from the Customers table
behaviorsarrayYesArray of Behaviors table definitions

Master (Customers Table) Definition

The master object points to your single Customers table. This is the central profile table that all attributes come from and all behaviors link to.

"master": {
  "name": "customers",
  "federatedQueryConfigId": "167",
  "schema": "public",
  "table": "customers",
  "keyColumn": "cdp_customer_id"
}
FieldTypeDescription
namestringDisplay name for the Customers table
federatedQueryConfigIdstringID from your Zero-Copy configuration (Step 3)
schemastringSnowflake schema name
tablestringSnowflake table name
keyColumnstringUnique identifier column (e.g., cdp_customer_id)

Attribute Definition

Each attribute maps a column from the Customers table to a segmentation property in CAS. Since all attributes reside in the Customers table, the table, tableKey, and masterKey fields all reference the same Customers table and its key column.

{
  "id": "1",
  "name": "email",
  "federatedQueryConfigId": "167",
  "schema": "public",
  "table": "customers",
  "tableKey": "cdp_customer_id",
  "masterKey": "cdp_customer_id",
  "column": "email",
  "type": "string",
  "createdAt": "2025-11-21T06:05:04.037Z",
  "updatedAt": "2025-11-21T06:05:04.037Z"
}
FieldTypeDescription
idstringUnique identifier for this attribute (sequential, starting from 1)
namestringDisplay name in the CAS segment builder
federatedQueryConfigIdstringZero-Copy configuration ID
schemastringSnowflake schema (same as master)
tablestringMust be the Customers table name
tableKeystringKey column in the Customers table (e.g., cdp_customer_id)
masterKeystringSame as tableKey since attributes come from the Customers table
columnstringColumn name in the Customers table containing the attribute value
typestringData type: string, number, boolean, or date
createdAtstringISO 8601 timestamp (use current time)
updatedAtstringISO 8601 timestamp (use current time)
Key Point

All attributes reference the same Customers table. The table field for every attribute must match the master.table value.

Behavior Definition

Each behavior maps a separate Behaviors table to CAS. The Behaviors table is linked to the Customers table via cdp_customer_id.

{
  "id": "1",
  "name": "behavior_pageviews",
  "federatedQueryConfigId": "167",
  "schema": "public",
  "table": "behavior_pageviews",
  "tableKey": "cdp_customer_id",
  "masterKey": "cdp_customer_id",
  "timeColumn": "time",
  "createdAt": "2025-11-21T06:05:04.056Z",
  "updatedAt": "2025-11-21T06:05:04.056Z",
  "columnMapping": [
    {
      "name": "td_url",
      "type": "string",
      "cdwColumn": "td_url"
    },
    {
      "name": "td_title",
      "type": "string",
      "cdwColumn": "td_title"
    }
  ]
}
FieldTypeDescription
idstringUnique identifier for this behavior
namestringDisplay name in CAS
federatedQueryConfigIdstringZero-Copy configuration ID
schemastringSnowflake schema
tablestringSnowflake Behaviors table name (separate from the Customers table)
tableKeystringColumn in the Behaviors table linking to the Customers table (e.g., cdp_customer_id)
masterKeystringKey column in the Customers table (e.g., cdp_customer_id)
timeColumnstringColumn containing the event timestamp
createdAtstringISO 8601 timestamp
updatedAtstringISO 8601 timestamp
columnMappingarrayArray of event column definitions

Each entry in columnMapping:

FieldTypeDescription
namestringDisplay name for the column in CAS
typestringData type: string, number, boolean, or date
cdwColumnstringActual column name in the Snowflake Behaviors table

Complete Example

This example defines a "Retail Composable Audience" with 12 customer attributes from the Customers table and 1 Behaviors table:

{
  "name": "Retail Composable Audience",
  "description": "Description of the composable audience",
  "timezone": "UTC",
  "kind": "composable",
  "isComposable": true,
  "master": {
    "name": "customers",
    "federatedQueryConfigId": "167",
    "schema": "public",
    "table": "customers",
    "keyColumn": "cdp_customer_id"
  },
  "attributes": [
    {
      "id": "1",
      "name": "email",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "email",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.037Z",
      "updatedAt": "2025-11-21T06:05:04.037Z"
    },
    {
      "id": "2",
      "name": "address",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "address",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.044Z",
      "updatedAt": "2025-11-21T06:05:04.044Z"
    },
    {
      "id": "3",
      "name": "aov",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "aov",
      "type": "number",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "4",
      "name": "city",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "city",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "5",
      "name": "country",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "country",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "6",
      "name": "first_name",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "first_name",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "7",
      "name": "last_name",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "last_name",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "8",
      "name": "gender",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "gender",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "9",
      "name": "ltv",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "ltv",
      "type": "number",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "10",
      "name": "membership_tier",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "membership_tier",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "11",
      "name": "next_best_channel",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "next_best_channel",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    },
    {
      "id": "12",
      "name": "next_best_offer",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "customers",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "column": "next_best_offer",
      "type": "string",
      "createdAt": "2025-11-21T06:05:04.053Z",
      "updatedAt": "2025-11-21T06:05:04.053Z"
    }
  ],
  "behaviors": [
    {
      "id": "1",
      "name": "behavior_pageviews",
      "federatedQueryConfigId": "167",
      "schema": "public",
      "table": "behavior_pageviews",
      "tableKey": "cdp_customer_id",
      "masterKey": "cdp_customer_id",
      "timeColumn": "time",
      "createdAt": "2025-11-21T06:05:04.056Z",
      "updatedAt": "2025-11-21T06:05:04.056Z",
      "columnMapping": [
        {
          "name": "td_url",
          "type": "string",
          "cdwColumn": "td_url"
        },
        {
          "name": "td_title",
          "type": "string",
          "cdwColumn": "td_title"
        }
      ]
    }
  ]
}