Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Table of Contents
maxLevel3

Prerequisites

  • Basic Knowledge of Treasure Data.

  • Basic knowledge of Airship / Airship Audience Lists

Limitations

  • 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.

  1. Open TD Console.

  2. Navigate to Integrations HubCatalog.

  3. Click the search icon on the far-right of the Catalog screen, and enter Airship.
  4. Hover over the AirShip connector and select Create Authentication.
    The following dialog opens.
  5. Enter the Base URL:

  6. Choose an authentication method.

  7. Enter a name for your connection.

  8. Select Continue.

Authentication Method

Select the Basic or Access token method.

For the Basic authentication method:

  1. In the Airship project dashboard, select the Settings > APIs & Integrations.

  2. Enter the App key, App secret, and App master secret.

For the Access token authentication method:

  1. In the Airship project dashboard, select the Settings > APIs & Integrations > Tokens.

  2. Create a new token and grant Audience Modification or All-access Role.

Configure Export Results in Your Data Connection

Configure the data connection.

Column name

Data type

Required

Example

identifier_type

string

Yes

ios_channel

identifier

string

Yes


Example

Code Block
languagesql
linenumberstrue
SELECT identifier_type, identifier
FROM table my_table

Configure the Connection by Specifying the Parameters

  1. Open the TD Console.

  2. Navigate to Data Workbench > Queries.

  3. Click New Query to create a new query or search for a saved query that you plan to use to export data.

  4. 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

  1. Type the connection name in the search box.

  2. Select your connection.

  3. Set the following parameters:

Parameter

Description

List Name (required)

Audience List name

Description (optional)

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.

Numbered Headings
start-numbering-with1
start-numbering-ath5

Excerpt Include
PD:Scheduling Jobs Using TD Console
PD:Scheduling Jobs Using TD Console
nopaneltrue


Optionally Configure Export Results in Workflow

Excerpt Include
Using TD Workflow with TD Integrations
Using TD Workflow with TD Integrations
nopaneltrue

Code Block
linenumberstrue
timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-target:
  td>: queries/sample.sql
  result_connection: airship
  result_settings:
    list_name: 'td uploaded list'
    list_description: 'ios and android channels'