AI-generated Key Takeaways
-
Represents a column header within a report, providing methods to retrieve its name for bulk uploads and report queries.
-
getBulkUploadColumnName()
returns the column header name for use in bulk uploads, mirroring the format seen in report downloads and bulk uploads from the Google Ads UI. -
getReportColumnName()
returns the column header name used within report queries, specifically for selectable columns when usingAdsApp.report()
. -
When creating a
CsvUpload
with aReport
, ensure to usegetBulkUploadColumnName()
for column creation. -
Note that
getBulkUploadColumnName()
will result in an error if the query employs GAQL instead of AWQL.
Methods:
Member | Type | Description |
---|---|---|
getBulkUploadColumnName() | String |
Returns the name of the column header to use in bulk uploads. |
getReportColumnName() | String |
Returns the name of the column header as used in report queries. |
getBulkUploadColumnName()
Returns the name of the column header to use in bulk uploads.
These names are the columns as they would appear in a report download from the Google Ads UI, and as recognized in bulk uploads.
NOTE: If you're generating a CsvUpload with Report, make sure to use this method in creation. Typical usage:
var upload = AdsApp.bulkUploads().newCsvUpload([ report.getColumnHeader("AdGroupId").getBulkUploadColumnName(), report.getColumnHeader("AdGroupName").getBulkUploadColumnName() ...]);
This method will return an error if the query uses GAQL rather than AWQL.
Return values:
Type | Description |
---|---|
String |
The name of the column header to use in bulk uploads. |
getReportColumnName()
Returns the name of the column header as used in report queries.
These names are the selectable columns in the query of AdsApp.report(String, Object).
Return values:
Type | Description |
---|---|
String |
The name of the column header as used in report queries. |