You can write job results from Arm Treasure Data directly to AdRoll API (Beta).
- Basic knowledge of Treasure Data, including the 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.
2. Use the TD Console to create your connection
You can use the Treasure Data console to configure your connection.
2.1. Create a new connection
You must create and configure the data connection to be used during export, prior to running your query. As part of the data connection, you provide authentication to access the integration.
Go to Catalog and search and select AdRoll.
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.
2.2. 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.
2.2.1. 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.
Click 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:
2.3. Example of a Query to Populate AdRoll
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;
2.4. Optional: Use of Scheduled Jobs for Output
You can use Scheduled Jobs with Result Output, to periodically write the output result to a target destination that you specify.
2.5. Optional: Configure Export Results in Workflows
Within Treasure Workflow, you can specify the use of the data connector to output data.
Click here for more information on using data connectors in Workflows to export data.
3.1. FAQ for Export into AdRoll
3.1.1. Q: 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.
3.1.2. Q: 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.
3.1.3. Q: 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.
3.2. FAQ for Log Messages
3.2.1. Q: 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.
3.2.2. Q: 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.
3.2.3. Q: 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.
3.2.4. Q: Missing or incorrect credentials..
- The user or password entered do not grant access to the AdRoll API.
3.2.5. Q: Something went wrong.
- The AdRoll API returns this generic message. Your guess is as good as ours.
4.1. Column Naming
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