JDBC Driver for Google Ads

Build 21.0.8137

CreateReportSchema

Creates a schema file based on the specified report.

Use this stored procedure to create a new view, which will include all attributes, metrics, and segments from specific resources. These columns can be from resource attributes (ResourceName), from non-segmenting resources (AttributeResources), or from segmenting resources (SegmentingResources). Below are a few examples:

EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance 1', SegmentingResources='campaign', OutputFolder='C:/Users/Public/Desktop'
EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance 2', Description='Sample description.'
EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance 3', AttributeResources='customer', Description='Sample description.'
EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance 4', SegmentingResources='campaign', AttributeResources='customer', Description='Sample description.'

For the last example, you can not select all the columns in a query, because some metrics do not support some resources. You should instead specify a subset, for example:

SELECT DistanceViewResourceName, CustomerTimeZone, CampaignName, CampaignEndDate, Clicks, Impressions FROM [Distance 4]

Input

Name Type Description
ReportName String The name for the new view.
ResourceName String The API name of the resource you want to use, for example, campaign, ad_group, etc.
AttributeResources String A comma-separated list of API resource names to include in addition to the ResourceName. Fields from these resources may be selected along with ResourceName in your SELECT and WHERE clauses. These fields will not segment metrics in your SELECT clause.
SegmentingResources String A comma-separated list of API resource names to include in addition to the ResourceName. Fields from these resources, when selected along with ResourceName in your SELECT and WHERE clauses, will segment metrics.
Metrics String A comma-separated list of metrics to include in the schema file.
Segments String A comma-separated list of segments to include in the schema file.
Description String An optional description for this custom report.
OutputFolder String The path to output the new schema file to. Set the Location property to a preferred path. A 'GoogleAds' folder containing the generated schema files will be created inside the OutputFolder, if it doesn't exist already. If a 'GoogleAds' folder already exists inside the OutputFolder, the schema files will be placed there.

Result Set Columns

Name Type Description
Success String Whether or not the schema was created successfully.
SchemaFile String The generated schema file.

Copyright (c) 2022 CData Software, Inc. - All rights reserved.
Build 21.0.8137