Google has rebranded and folded DoubleClick for Publishers into Google Ad Manager.
This connector was renamed from "Google DoubleClick for Publisher" to "Google Ad Manager via Data Transfer Reports".
You can import Google Doubleclick for Publisher (DFP) data objects into Treasure Data.
This topic includes:
Basic knowledge of Treasure Data
Basic knowledge of Google DFP
Authorized Treasure Data Service Account access to your Google DFP Account
Grant Access for Treasure Data
Treasure Data’s DFP input connector requires permissions to read data from your Google DFP account. From your Google DFP console, click “Admin” table, select “Global settings” and then “All network settings”, you can see a button on the right panel at the “Service account user” section to grant access to a service account user. Complete the form as shown in the following image:
After you grant access to our service account email (email@example.com), complete the following steps to import your data.
Use TD Console
Create a New Connection
Go to Integrations Hub > Catalog and search and select Google Ad Manager via Data Transfer Reports for Import. The dialog opens. Enter your DFP network information that you can find in your Google DFP console by clicking “Admin” > “Global settings” > “All network settings” > “Network code”.
Create a New Source
After creating the connection, you are automatically taken to the My Authentications tab. Look for the connection you created and click New Source.
The following dialog opens. Provide information details and click Next.
Next, you see a Preview of your data similar to the following dialog. To make changes, click on Advanced Settings otherwise, click Next.
Select the database and table where you want to transfer the data:
Specify the schedule of the data transfer using the following dialog and click Start Transfer
You see the new data transfer in progress listed under the My Input Transfers tab and a corresponding job are listed in the Jobs section.
Use Command Line
Install ‘td’ Command v0.11.9 or Later
You can install the newest TD Toolbelt.
Create Configuration File
Prepare configuration file (for eg: load.yml) with your Google DFP account access information, as shown in the following example:
This example dumps Google DFP Order data object:
target: Google DFP data object you want to import.
See the Appendix for the list of available target.
network_code: Google DFP network code
auth_method: Support authorization via a Google service account (required, supported value: SERVICE_ACCOUNT)
start_date: import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
end_date: import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
The start_date and end_date is available (and optional) for Order target. For the list of all options available for each target, see the Appendix
For more details on available out modes, see the Appendix
Preview Data to Import (Optional)
You can preview data to be imported using the command td connector:preview.
Submit the Load Job
Submit the load job. It may take a couple of hours depending on the data size. Users need to specify the database and table where their data are stored.
It is recommended to specify --time-column option, because Treasure Data’s storage is partitioned by time (see also data partitioning) If the option is available, the Data Connector will choose the first long or timestamp column as the partitioning time. The type of the column specified by --time-column must be either of long and timestamp type.
If your data doesn’t have a time column you can add a time column using the add_time filter option. More details at add_time filter plugin.
The td connector:issue command assumes that you have already created database(td_sample_db) and table(td_sample_table). If the database or the table do not exist in TD, this command will not succeed. You must create the database and table manually or use the --auto-create-table option with the td connector:issue command to auto create the database and table:
You can assign Time Format column to the "Partitioning Key" by "--time-column" option.
You can schedule periodic Data Connector execution for periodic Google DFP import. We configure our scheduler carefully to ensure high availability. By using this feature, you no longer need a cron daemon on your local datacenter.
Create the Schedule
A new schedule can be created using the td connector:create command. The name of the schedule, cron-style schedule, the database and table where their data will be stored, and the Data Connector configuration file are required.
The `cron` parameter also accepts these three options: `@hourly`, `@daily` and `@monthly`.
By default, schedule is setup in UTC timezone. You can set the schedule in a timezone using -t or --timezone option. The `--timezone` option only supports extended timezone formats like 'Asia/Tokyo', 'America/Los_Angeles' etc. Timezone abbreviations like PST, CST are *not* supported and may lead to unexpected schedules.
List the Schedules
You can see the list of scheduled entries by td connector:list.
Show the Setting and History of Schedules
td connector:show shows the execution setting of a schedule entry.
td connector:history shows the execution history of a schedule entry. To investigate the results of each individual execution, use td job <jobid>.
Delete the Schedule
td connector:delete removes the schedule.
Modes for Out Plugin
You can specify file import mode in out section of load.yml.
This is the default mode and records are appended to the target table.
replace (In td 0.11.10 and later)
This mode replaces data in the target table. Any manual schema changes made to the target table remains intact with this mode.
Company data object
Creative data object
Inventory AdUnit data object
Line Item data object
Order data object
Placement data object
Reporting using saved report query
Available Target Options
Target \ Options
start_date (optional): import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
end_date (optional): import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
report_query (required): the query name (or id) of the saved report query in your Google DFP console
last_fetched_datetime (optional): only import data that has last modified time after (exclusive) this date time. This value is in epoch millis format, e.g. ‘1509511116000’ (08 Nov 2017 15:33:20)
The report target executes the query specified in report_query to get the report and import the data into our database. Hence, the query must be accessible by our system in advance. You can grant access to our Google DFP service account email (firstname.lastname@example.org) in the “User able to edit” field:
Pay attention to the date range you are using in the report query. From here, you can find the list of dynamic date ranges supported by Google API.