You can write job results from Treasure Data directly to AdRoll API.
Basic knowledge of Treasure Data, including TD Toolbelt.
An AdRoll account (https://www.adroll.com/)
An AdRoll developer account (https://developers.adroll.com/)
Authorized Treasure Data account access to AdRoll
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.
1. Open TD Console.
2. Navigate to Integrations Hub > Catalog.
3. Click the search icon on the far-right of the Catalog screen, and enter AdRoll.
4. 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.
Advertiser ID (required): The ID used to group audiences under.
Retry Limit (optional): Number of times to attempt a network operation. Default: 7
Connect Timeout in Seconds(optional): The time, in seconds, to wait until aborting a connection operation. Default: 300, which is equivalent to 5 minutes.
Read Timeout in Seconds (optional): The time, in seconds, to wait until aborting a read operation. Default: 900, which is equivalent to 15 minutes.
Write Timeout in Seconds (optional): The time, in seconds, to wait until aborting a write operation. Default: 900, which is equivalent to 15 minutes.
Skip on invalid records? (optional): Checkbox to either continue processing if one or more invalid records are encountered (checked) or otherwise terminate processing (unchecked).
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:
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.
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?
Yes, AdRoll has several resource limits. AdRoll API calls can only be executed a total of 10,000 times per day. Each AdRoll API call payload cannot exceed 10MB in size. Each advertiser organization can only support 100 CRM type segments. Exceeding any of these limits results in an error.
Note that these limits can be increased by contacting AdRoll.
Is there a difference in AdRoll API behavior between CRM and Custom segments?
The AdRoll API presents the following differences and limitations:
CRM segments require at least 100 data items to either create or update. Custom segments have no limits on the number of data items.
There is a limit on the number of CRM segments that can exist within an advertiser organization (default 100). There is no limit to the number of Custom segments.
During update operations, where the segment ID is provided, CRM segment data is entirely replaced and not appended to, while Custom segment data is appended to the existing data.
FAQ for Log Messages
Too many CRM segments created for the organization <id> (max 100 segments)
The create CRM segment limit has been exceeded. Either delete some existing CRM segments or contact AdRoll to increase the limit.
Minimum requirement of 100 valid plain-text emails or MD5 hashed emails not met. Only 1 valid emails or MD5 hashes found
This error only affects CRM segments. CRM segments require at least 100 data items.
We are currently in a scheduled maintenance window, please try again later. See http://status.adroll.com/ for more information
This is a message from AdRoll indicating that the API is temporarily unavailable.
Missing or incorrect credentials
The user or password entered do not grant access to the AdRoll API.
Something went wrong
The AdRoll API returns this generic message: Your guess is as good as ours.
Data exported to AdRoll must follow the AdRoll schema. Supported column names are:
type : The operation (CRM or custom) to perform on an segment
data : The data (email or cookie id) to add to a segment
segment_id : The segment ID
segment_name : The segment name