Skip to content

Treasure Data cohort import

This article describes how to import user cohorts from Treasure Data to Braze so you can send targeted campaigns based on data that may only exist in your warehouse.

Prerequisites

Requirement Description
Treasure Data account A Treasure Data account is required to take advantage of this partnership.
Braze Data Import key This can be captured in the Braze dashboard from Partner Integrations > Technology Partners and then select Heap.
Braze REST endpoint Your REST endpoint URL. Your endpoint will depend on the Braze URL for your instance.
Static IP Address of Treasure Data The static IP address of Treasure Data is the access point and source of the linkage for this Integration. To determine the static IP address, contact your Treasure Data Customer Success representative or Treasure Data Technical support.

Data import integration

Step 1: Get your Braze data import key

In Braze, navigate to Partner Integrations > Technology Partners and select Treasure Data. Here, you will find your REST endpoint and generate your Braze data import key. After the key is generated, you can create a new key or invalidate an existing one.

Step 2: Create a data connection

Before you create your data connection within Treasure Data, you’ll need to authenticate. First, select Integrations Hub, then Catalog.

Treasure Data Integrations Hub Catalog

Search for the Braze Integration in the Catalog, then hover over the icon and select Create Authentication. Enter your credentials, name your authentication, then select Done.

Treasure Data Integrations Hub Catalog

Step 3: Define your query

  1. Navigate to Data Workbench > Queries.
  2. Select New Query.
  3. Run the query to validate the result set.

Treasure Data Integrations Hub Catalog

Use case: Syncing cohorts by identifier

Here’s an example table in Treasure Data:

external_id email device_ids
TDCohort1 [email protected] 1a2b3c
TDCohort2 [email protected] 4d5f6g
TDCohort3 [email protected] 7h8j9k
TDCohort4 [email protected] 1ab2cd

To sync cohorts using the external ID, run the following query:

1
2
3
4
SELECT
  external_id as user_ids
FROM
  example_cohort_table

After running the query, these user aliases will be added to the cohort in Braze:

  • TDCohort1
  • TDCohort2
  • TDCohort3
  • TDCohort4

Here’s an example table in Treasure Data:

external_id email device_ids
TDCohort1 [email protected] 1a2b3c
TDCohort2 [email protected] 4d5f6g
TDCohort3 [email protected] 7h8j9k
TDCohort4 [email protected] 1ab2cd

To sync cohorts using the user alias, run the following query:

1
2
3
4
SELECT
  email
FROM
  example_cohort_table

After running the query, these user aliases will be added to the cohort in Braze:

Here’s an example table in Treasure Data:

external_id email device_ids
TDCohort1 [email protected] 1a2b3c
TDCohort2 [email protected] 4d5f6g
TDCohort3 [email protected] 7h8j9k
TDCohort4 [email protected] 1ab2cd

To sync cohorts using the device ID, run the following query:

1
2
3
4
SELECT
  device_ids
FROM
  example_cohort_table

After running the query, these device IDs will be added to the cohort in Braze:

  • 1a2b3c
  • 4d5f6g
  • 7h8j9k
  • 1ab2cd

Step 4: Specify the result export target

Once the query has been built, select Export Results. You can select an existing authentication, such as the one created in the last steps, or create a new authentication to be used for output.

Treasure Data Integrations Hub Catalog

Follow Treasure Data’s steps for configuring your export to meet your use case.

Step 5: Execute the query

Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to Braze.

Step 6: Create a Braze segment from the Treasure Data Export

In Braze, navigate to Segments, create a new segment, and select Treasure Data Cohorts as your filter. From here, you can choose which Treasure Data cohort you wish to include. After your Treasure Data cohort segment is created, you can select it as an audience filter when creating a campaign or Canvas.

Treasure Data Integrations Hub Catalog

HOW HELPFUL WAS THIS PAGE?
New Stuff!