You can write job results from Treasure Data directly to AdRoll API.

Prerequisites

An AdRoll application must be created and then approved by AdRoll prior to Treasure Data connector use. See https://developers.adroll.com/user/me/apps for more details. (You must login to see the information.)

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 AdRoll.
Hover over the AdRoll connector and select Create Authentication.

The following dialog opens.


Username and password are the same values required to log into https://developers.adroll.com/user/login


API Key is the same as the Client ID that is generated as part of an AdRoll application.


Configure Export Results in Your Data Connection

In this step, you create or reuse a query. In the query, you configure the data connection.

Note: Sometimes you need to define the column mapping in the query.

Configure the Connection by Specifying the Parameters

Go to the TD Console. Go to Data Workbench > Queries. Access the query that you plan to use to export data.

Select Export Results located at top of your query editor. The Choose Integration dialog opens. Type the connection name in the search box to filter and select your connection.


Parameters:

 The following is a sample configuration: 


Example of a Query to Populate AdRoll

From Treasure Data, run the following query with Export Results into a connection for AdRoll:

Code Example

SELECT type, data, segment_id, segment_name FROM your_table;


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.


Optionally Configure Export Results in Workflow


timezone: UTC

_export:
  td:
    database: sample_datasets

+td-result-into-adroll:
  td>: queries/sample.sql
  result_connection: your_connections_name
  result_settings:
    advertiser_id: 12345
    request_retries: 7
    request_connect_timeout: 300
    request_read_timeout: 900
    request_write_timeout: 900
    skip_invalid: true

You can read more about using data connectors in Workflows to export data.

FAQ for Export into AdRoll

What happens if both segment ID and segment name are provided for a row?

If segment ID is non-NULL, then the data represented by the row is used to update an existing segment that matches the segment ID provided. If segment ID is NULL, then the data represented by the row is used to create a new segment.

Note that AdRoll does not support unique segment names, so there can be multiple segments with the same segment name.

Are there any resource limits imposed by the AdRoll API?

Is there a difference in AdRoll API behavior between CRM and Custom segments?

The AdRoll API presents the following differences and limitations:

FAQ for Log Messages

Too many CRM segments created for the organization <id> (max 100 segments)

Minimum requirement of 100 valid plain-text emails or MD5 hashed emails not met. Only 1 valid emails or MD5 hashes found

We are currently in a scheduled maintenance window, please try again later. See http://status.adroll.com/ for more information

Missing or incorrect credentials

Something went wrong

Column Naming

Data exported to AdRoll must follow the AdRoll schema. Supported column names are: