You can import Google Doubleclick for Publisher (DFP) data objects into Treasure Data.
- Basic knowledge of Treasure Data
- Basic knowledge of Google DFP
- Authorized Treasure Data Service Account access to your Google DFP Account
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.
After you grant access to our service account email (google-dfp@affable-beach-161802.iam.gserviceaccount.com), complete the following steps to import your data.
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".

Prepare configuration file (for eg: load.yml) with your Google DFP account access information, as shown in the following example:
in:
type: google_dfp
target: order
network_code: 1234567
auth_method: SERVICE_ACCOUNT
start_date: 2017-01-02T12:00:00
end_date: 2017-11-10T10:00:00
out:
mode: replaceThis 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
This is the default mode and records are appended to the target table.
in:
...
out:
mode: appendThis mode replaces data in the target table. Any manual schema changes made to the target table remains intact with this mode.
in:
...
out:
mode: replace| Target | Description |
|---|---|
| company | Company data object |
| creative | Creative data object |
| inventory_adunit | Inventory AdUnit data object |
| line_item | Line Item data object |
| order | Order data object |
| placement | Placement data object |
| report | Reporting using saved report query |
| Target Options | start_date | end_date | report_query | last_fetched_datetime |
|---|---|---|---|---|
| company | x | |||
| creative | x | |||
| inventory_adunit | x | |||
| line_item | x | x | x | |
| order | x | x | x | |
| placement | x | |||
| report | x |
- 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 (google-dfp@affable-beach-161802.iam.gserviceaccount.com) 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.