ODBC Driver for Google Campaign Manager 360

Build 24.0.9060

Retrieving Google Campaign Manager 360 data

Google Campaign Manager 360 data is organized into various metrics (Clicks, CostPerClick, Impressions, etc.), which can be queried over various dimensions (Country, Month, etc.). Auto-discovering all existing reports for your GCM 360 account is extremely expensive. To work around this, the driver exposes five generic tables, one for each type of report, which allow for ad-hoc reporting as well as running your existing reports. There is also the option to create custom schema files for your existing reports so they can be queried as their own tables. These sections will discuss the different strategies for querying your GCM 360 data with the driver.

Built-In Reporting Tables

There are five built-in tables in the driver: CrossDimensionReachReport, FloodlightReport, PathToConversionReport, ReachReport, and StandardReport. These generic tables include all possible dimensions and metrics for the given report type but not all combinations of dimensions or metrics are valid in GCM 360. Therefore, 'SELECT *' queries to these tables are not permitted normally. Instead, you have several options of pulling data from these tables:

  1. Ad-hoc reporting is available by running a query selecting any valid combination of dimensions or metrics from the table. For example:
    SELECT Campaign, CampaignId, Impressions, Clicks, ClickRate, TotalConversions FROM StandardReport

    This query involves a multi-step process. First, the report definition is created in GCM 360 and the processing is started. Note that GCM 360 reports can take a very long time to process especially if you have a large volume of data. Once the processing is finished, the report is downloaded and output by the driver. Finally, the report definition is deleted from GCM 360.

  2. You can supply a ReportID in the filter for the query to run an existing report. This query allows for 'SELECT *' but note that only the fields that are actually included in the report will be populated with data with the rest returning NULL. For example:
    SELECT * FROM StandardReport WHERE ReportID='123456789'

    The report is executed in real time so note that GCM 360 reports can take a very long time to process especially if you have a large volume of data. The report definition is not deleted in this case.

  3. You can supply both a ReportID and a FileID in the filter to download a previously run report. This query allows for 'SELECT *' but note that only the fields that are actually included in the report will be populated with data with the rest returning NULL. For example:
    SELECT * FROM StandardReport WHERE ReportID='123456789' AND FileID='987654321'

    Since the report has already been executed in this case, results will return immediately. The RunReport and CheckReportStatus stored procedures along with this method of querying can be used for asynchronous processing of the report in your application.

Existing Google Campaign Manager 360 Reports

The driver also offers the CreateCustomSchema stored procedure for creating new table definitions for your existing reports in GCM 360. The stored procedure takes a table name, the report ID, and an output folder as inputs. Calling it will create a new schema file that you can query like any other table. You will need to set the Location connection property to the folder containing the new script files in order to access them after they are created. For example:

EXEC CreateCustomSchema TableName='MyCustomReport', ReportID='123456789', OutputFolder='C:\Users\Administrator\Desktop'

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060