You can write job results from Treasure Data directly to Airship Audience Lists. In Airship, you can then use the List to target specific users.
This topic contains:
Basic Knowledge of Treasure Data.
Basic knowledge of Airship / Airship Audience Lists
Due to API functions, you can override the list content; you cannot append the list.
You can upload up to 10 million records.
You can create up to 100 uploaded lists.
Use the TD Console to Create Your Connection
Create a New Connection
In Treasure Data, you must create and configure the data connection prior to running your query. As part of the data connection, you provide authentication to access the integration.
Open TD Console.
Navigate to Integrations Hub > Catalog.
- Click the search icon on the far-right of the Catalog screen, and enter Airship.
- Hover over the AirShip connector and select Create Authentication.
The following dialog opens.
Enter the Base URL:
Choose an authentication method.
Enter a name for your connection.
Select the Basic or Access token method.
For the Basic authentication method:
In the Airship project dashboard, select the Settings > APIs & Integrations.
Enter the App key, App secret, and App master secret.
For the Access token authentication method:
In the Airship project dashboard, select the Settings > APIs & Integrations > Tokens.
Create a new token and grant Audience Modification or All-access Role.
Configure Export Results in Your Data Connection
Configure the data connection.
Configure the Connection by Specifying the Parameters
Open the TD Console.
Navigate to Data Workbench > Queries.
Click New Query to create a new query or search for a saved query that you plan to use to export data.
At the top of your query editor, select Export Results.
The Choose Integration dialog opens. You can use an existing connection or create a new connection for your export.
Use an existing connection
Type the connection name in the search box.
Select your connection.
Set the following parameters:
List Name (required)
Audience List name
Audience List description
Skip Empty Records (optional)
The default is True. If the query result contains an empty or null column, the row will be skipped, otherwise, the job will fail and you need to remove empty records manually.
Optionally Schedule the Query Export Jobs
You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.
1. Navigate to Data Workbench > Queries.
2. Create a new query or select an existing query.
3. Next to Schedule, select None.
4. In the drop-down, select one of the following schedule options:
Review Custom cron... details.
|@daily (midnight)||Run once a day at midnight (00:00 am) in the specified time zone.|
|@hourly (:00)||Run every hour at 00 minutes.|
Custom cron... Details
Run once an hour.
Run once a day at midnight.
Run once a month at midnight on the morning of the first day of the month.
Create a job that has no scheduled run time.
The following named entries can be used:
Day of Week: sun, mon, tue, wed, thu, fri, sat.
Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.
A single space is required between each field. The values for each field can be composed of:
|Field Value||Example||Example Description|
A single value, within the limits displayed above for each field.
|Configures the schedule to run at midnight (00:00) on the first day of each month.|
|A range ||Configures the schedule to run at midnight (00:00) on the first 10 days of each month.|
|A list of comma-separated values ||Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month.|
|A periodicity indicator ||Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. |
|A comma-separated list of any of the above except the ||Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month.|
5. (Optional) You can delay the start time of a query by enabling the Delay execution.
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 imported to the specified container destination.
Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications.
Optionally Configure Export Results in Workflow
Within Treasure Workflow, you can specify the use of a data connector to export data.
Learn more at Using Workflows to Export Data with the TD Toolbelt.