You can write Treasure Data job results directly to your MediaMath Server.


This feature is in BETA. Contact your Customer Success Representative for more information.


Prerequisites

Requirements and Limitations

Static IP Address of Treasure Data

The static IP address of Treasure Data is the access point and source of the linkage for this Integration. To determine the static IP address, contact your Customer Success representative or Technical support.

Use the TD Console to Create Your Connection

We support two options for connecting to MediaMath. You can use Treasure Data as the Data Provider or you can use your own MediaMath credentials. We encourage you to bring your own credentials.

Create a New Connection

In Treasure Data, you must create and configure the data connection before running your query. As part of the data connection, you provide authentication to access the integration.

Open TD Console.
Navigate to Integrations Hub Catalog.
Search for and select MediaMath.
Select Create Authentication.
Select Data Provider. You can select either Treasure Data  or User account.
If you select Treasure Data, select Continue.

If you select User, enter your credentials to authenticate. Select Continue.

Create a name for your authentication.
Select Done.


Define your Query

Your query requires one and only one column name `id`. Other column names will be segment names.

Integration Parameters for MediaMath 


Parameters

Value

Description

Action- Add All Segments
- Remove All Segments
- Update Segments Based On Data

Agency Name
Agency Name from MediaMath.  Only accept alphanumeric.
User Name Space
If Ids came from MediaMath then use mm. If Ids are 1P then use your Partner Namespace. Only accept alphabet and cannot be blank or empty.
Segment Name Space
If Segments came from MediaMath then use mm. If Segments are 1P then use your Partner Namespace. Only accept alphabet and cannot be blank or empty.
User Table Id
Exchange ID is used for identifying the match table for user IDs outside of the MediaMath namespace. Required when User Name Space is not mm.
Is Mobile?
Checked if Id is mobile or CTV id
Is Id GUID v4 format?
Checked if Id is GUID Version 4 format
Is Segment 32bit integer?
Checked if Segment Identifier is a 32-bit integer (segment name from 0 - 2^32)
  • If this option is unchecked then the segment is the value entered in "Output Column Name"
  • If this option is checked then the segment is the value entered for "SegmentId"
Skip Invalid Records
If you checked when data rows identify errors, the export job still continues and is successful. Otherwise, the job fails.

Example Query

Your query requires only one column with the name `id` and a data type of 'String'. Other columns are segment names. 


SELECT id, segment_1, segment_2  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


The action accepts the following values:


_export:
  td:
    database: mediamath_db

+mediamath_export_task:
  td>: export.sql
  database: ${td.database}
  result_connection: new_created_mediamath_auth
  result_settings:         
    type: media_math
 	data_provider: user
    host: host
    port: 22
    user_name: user_name
    password: password
    partner_name: partner_name
    action: add
    agency_name: agency_name
    id_name_space: mm
    segment_name_space: mm
    user_table_id: user_table_id
    is_mobile: true
    is_id_guid_format: true
    is_segment_32bit_integer: true
    skip_invalid_records: true