Composable Audience Studio (CAS) is a deployment mode of Treasure Data's CDP that enables you to build and manage audience segments directly on your Databricks data warehouse without copying data into Treasure Data. Using Zero-Copy / Federated Query architecture, CAS queries your Databricks tables in place, keeping data under your existing governance and access controls.
This guide walks through the end-to-end process of setting up a Composable Parent Segment on Databricks, from connection configuration to segment creation.
- Service principal and PAT authentication for secure Databricks access
- Databricks authentication configuration to connect Treasure Data to your Databricks workspace
- Parent Segment configuration file defining your customer and behavior tables
- API upload of the configuration to create the Parent Segment in CAS
Before you begin, ensure you have:
- A Treasure account with admin-level permissions
- A Databricks workspace with:
- Unity Catalog enabled with a catalog, schema, and tables containing your customer and event data
- A SQL warehouse or compute cluster available for query execution
- A service principal with appropriate permissions on the target catalog/schema/tables
- A Treasure API key (Master API key recommended)
Data never leaves your Databricks environment. Treasure Data sends federated queries and receives results at query time.
A Composable Parent Segment is composed of a single Customers table and multiple Behaviors tables.
The Customers table stores unified profile data and attributes, with each record representing a single profile. A unique identifier column is required for each profile.
- Contains all customer attributes (e.g., email, name, city, membership tier, LTV)
- Each row = one unique customer profile
- Unique identifier column serves as the primary key
Behaviors tables contain activity records for specific actions taken by profiles (e.g., website visits, orders). Each Behaviors table must include a unique ID column that links the activity record to the corresponding customer profile via the Unique identifier.
- Each table represents a distinct type of activity (page views, purchases, etc.)
- Multiple behavior records can exist per customer
- Must include a time column for temporal queries
The relationship between Customers and each Behaviors table is 1-to-many: one customer profile can have many behavior records.