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.)
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.
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.
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:
From Treasure Data, run the following query with Export Results into a connection for AdRoll:
SELECT type, data, segment_id, segment_name FROM your_table;
You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.
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.
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.
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