CreateReportSchema

Creates a schema file based on the specified report. Columns that will be included by default are attributes of the resource, its metrics, segments and columns of non-segmenting attributed resources. If you want to include columns of segmenting resources too you can use SegmentingResources input.

Use this stored procedure when you want to:

  • Create a new view from a specific resource in Google AdWords API v201809. For example:
            EXEC CreateReportSchema ResourceName='click_view', Description='Clicks on a campaign.', OutputFolder='C:\\Users\\User\\Desktop'
            EXEC CreateReportSchema ResourceName='click_view', ReportName='ClicksView_New', Description='Clicks on a campaign.'
            
  • Create a new view, which will include only a few columns from a specific resource. These columns can be resource attributes, metrics, segments or even columns from a segmenting resource. You can utilize inputs AttributeResources, SegmentingResources, Metrics and Segments. Below are a few examples:
            EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance NEW', SegmentingResources='Campaign'
            EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance FewColumns_1', Metrics='Impressions', Segments='Device, Year', Description='Sample description.'
            EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance FewColumns_2', AttributeResources='DistanceViewMetricSystem, DistanceViewDistanceBucket', Metrics='Impressions, CustomerCurrencyCode', Segments='Device, Year', Description='Sample description.'
            EXEC CreateReportSchema ResourceName='distance_view', ReportName='Distance FewColumns_3', SegmentingResources='Campaign', AttributeResources='DistanceViewMetricSystem, DistanceViewDistanceBucket', Metrics='Impressions, CustomerCurrencyCode', Segments='Device, Year', Description='Sample description.'
            

Input

Name Type Description
ResourceName String The name of the resource you want to use.
ReportName String The name for the new view.
PushOnlyFields String Boolean value, indicating if metric, segments and selectable fields should not be pushed. Default is false.
AttributeResources String A comma-separated list of attributes to include in the schema file.
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.
SegmentingResources String A comma-separated list of resources, the columns of which you want to include in the new view. These columns will segment metrics when querying.
Description String An optional description for the view.
OutputFolder String The path to output the new schema file to. The value for the Location connection string property will be used by default.

Result Set Columns

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