Skip to content
Last updated

Amazon Marketing Cloud Import Integration

Introduction Video

Overview

By default, you type in a normal view.

The Amazon Marketing Cloud Import Integration enables you to import the enrichment data from Amazon Marketing Cloud to the Treasure Data CDP database.

Prerequisites

  • Complete Amazon Ads API onboarding.
  • Access to Amazon Marketing Cloud instance
  • Basic knowledge of Amazon Marketing Cloud
  • Basic knowledge of Treasure Data

Static IP Address of Treasure Data Integration

If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection.

Please find the complete list of static IP addresses, organized by region, at the following link:
https://api-docs.treasuredata.com/en/overview/ip-addresses-integrations-result-workers/

Import from Amazon Marketing Cloud via TD Console

Obtain Amazon Marketing Cloud Instance ID and Account ID

After logging into an Amazon Marketing Cloud instance, perform the following steps to obtain the Amazon Marketing Cloud Instance ID and Account ID.

  1. Obtain the Amazon Marketing Cloud Instance ID for an instance from the Instance list.
  2. View the Amazon Marketing Cloud Account ID assigned to parameter entityId.

Create a New Connection

When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and specify the source information.

  1. Open TD Console.

  2. Navigate to Integrations Hub >  Catalog.

  3. Search for and select Amazon Marketing Cloud.

  4. Select the Click here link in New Authentication to connect to a new Amazon Account.

  5. You will be redirected to Amazon Marketing Cloud instance to log in using OAuth. Provide the username and password.

  6. Select Allow to accept consent screen. This redirects to TD console.

  7. Select Amazon Marketing Cloud again, provide AMC Instance ID, and AMC Account ID.

  8. Select the Amazon account for OAuth connection.

The S3 related fields are only required for uploading audience data to Amazon Marketing Cloud. You can ignore those fields for import to Treasure Data.

9. Enter a name for your connection and select Done.

Transfer Your Enrichment Data to Treasure Data

After creating the authenticated connection, you are automatically taken to the Authentications tab. Check for the connection you created and select New Source.

Create a Connection

  1. Type a name for your Sourcein the Data Transfer field**.**
  2. Select Next

Identify a Source Table

  1. Edit the following parameters as applicable.

ParameterDescription
Query Type- By Workflow - Create or update workflow before submitting it for execution. - On Demand- No need to create a workflow. Uses the SQL query to submit an ad-hoc workflow.
Workflow IdentifierOnly required for By Workflow query type.
QueryThe SQL Query to fetch enrichment data from Amazon Marketing Cloud. For AMC Query Library for reference, see https://advertising.amazon.com/marketing-cloud/instructional-queries
Workflow Parameter for SQL Query (Optional)The custom parameter names for SQL query. It is only required for By Workflow query type.
Workflow Parameter Values for SQL Query (Optional)The custom parameter values. Binds with custom parameter names when you submit workflow for execution. It is only required for By Workflow query type.
Auto Create WorkflowRequired for By Workflow query type.
Auto Update WorkflowRequired for By Workflow query type.
Time Window Type- Most Recent Day - Most Recent Week - Current Month - Previous Month - Explicit Time Range
Start TimeOnly required for Explicit Time Range query type.
End TimeOnly required for Explicit Time Range query type.
Schema Settings(Required) The schema structure for the current job. You need to edit the schema settings to add the column names and data type to match the columns used in the select statement of the query sent to AMC. Failure to do so can result in a job failing with the Too many columns error.

Define Data Settings

  1. Select Next. The Data Settings page opens.
  2. Optionally, edit Data Settings or skip this page of the dialog.

Preview your Data

Data preview is optional, and you can safely skip to the next page of the dialog if you choose to.

  1. To see apreview of your data before running the import, select Generate Preview.
  2. Select Next. The Data Preview page opens.
  3. If you want to preview your data, select Generate Preview.
  4. Verify the correct data is showing.

Define your Data Placement

In this dialog, you can specify where your data is placed and schedule how often it runs this import.

  1. Select Next. The Data Placement page opens.
  2. In the Storage section, you can create a new or select an existing database and create a new or select an existing table where you want to place the imported data.
  3. Select Database > Select an existing or Create New Database.
  4. Select TableSelect an existing or Create New Table.
  5. Choose the Append or Replace method for importing the data.
    1. Append (default) - Data import results are appended to the table.
      If the table does not exist, it will be created.
    2. Replace - Replaces the entire content of an existing table with the resulting output of the query.
      If the table does not exist, a new table is created.
  6. Select the Timestamp-based Partition Key column.
    If you want to set a partition key seed different from the default key, you can specify the long or timestamp column as the partitioning time. As a default time column, it uses upload_time with the add_time filter.
  7. Select the Timezone for your data storage.
  8. Under Schedule, you can choose when and how often to run this query.
    • Run once:
      1. Select Off.
      2. Select Scheduling Timezone.
      3. Select Create & Run Now.
    • Repeat the query:
      1. Select On.
      2. Select the Schedule. The UI provides these four options: @hourly@daily, and @monthly or custom cron.
      3. You can also select Delay Transfer and add a delay of execution time.
      4. Select Scheduling Timezone.
      5. Select Create & Run Now.

After your transfer has run, you can see the results of your transfer in Data Workbench > Databases.