Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Treasure Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as Treasure Data in the Integrations object

This destination is maintained by Treasure Data.

Once the Segment library is integrated with your server, toggle Treasure Data on in your Segment destinations, and add your API key (which you can find in your Treasure Data console). You will also need to specify the destination database name.

The Segment Treasure Data destination is 100% handled through our servers, so you don't need to bundle their iOS or Android SDKs.


Table Structure

table-structure page anchor

All of the data from your Segment workspace is hosted on Treasure Data database. Inside that database you will see multiple tables for each of your Segment sources, one for each of the types of data.

Every table is namespaced by the source's name. Inside each source there are a few standard tables:

source.aliases

sourcealiases page anchor

A table with all of your alias method calls. This table will include all of the traits you identify users by as top-level columns, for example <source>.aliases.email.

A table with all of your group method calls. This table will include all of the traits you record for groups as top-level columns, for example <source>.groups.employee_count.

A table with all of your identify method calls. This table will include all of the traits you identify users by as top-level columns, for example <source>.identifies.email.

A table with all of your page method calls. This table will include all of the properties you record for pages as top-level columns, for example <source>.pages.title.

A table with all of your screen method calls. This table will include all of the properties you record for screens as top-level columns, for example <source>.screens.title.

For track calls, each event like Signed Up or Order Completed also has it's own table, with columns for each of the event's distinct properties.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to Treasure may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
API Write Keystring
required

You can find your write key in your Treasure Data Account Settings


Database Namestring
required

The database name you want to send data to in Treasure Data.