GoogleAdsToGcsOperator

Google

Fetches the daily results from the Google Ads API for 1-n clients Converts and saves the data as a temporary CSV file Uploads the CSV to Google Cloud Storage

View on GitHub

Last Updated: Sep. 13, 2022

Access Instructions

Install the Google provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

client_idsRequiredGoogle Ads client IDs to query
queryRequiredGoogle Ads Query Language API query
attributesRequiredList of Google Ads Row attributes to extract
bucketRequiredThe GCS bucket to upload to
objRequiredGCS path to save the object. Must be the full file path (ex. path/to/file.txt)
gcp_conn_idAirflow Google Cloud connection ID
google_ads_conn_idAirflow Google Ads connection ID
page_sizeThe number of results per API page request. Max 10,000
gzipOption to compress local file or file data for upload
impersonation_chainOptional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).
api_versionOptional Google Ads API version to use.

Documentation

Fetches the daily results from the Google Ads API for 1-n clients Converts and saves the data as a temporary CSV file Uploads the CSV to Google Cloud Storage

See also

For more information on the Google Ads API, take a look at the API docs: https://developers.google.com/google-ads/api/docs/start

See also

For more information on how to use this operator, take a look at the guide: Google Ads to GCS

Was this page helpful?