Google Ads Operators¶
Google Ads, formerly Google AdWords and Google AdWords Express, is a platform which allows businesses to advertise on Google Search, YouTube and other sites across the web.
Prerequisite Tasks¶
Google Ads to GCS¶
To query the Google Ads API and generate a CSV report of the results use
GoogleAdsToGcsOperator
.
run_operator = GoogleAdsToGcsOperator(
client_ids=CLIENT_IDS,
query=QUERY,
attributes=FIELDS_TO_EXTRACT,
obj=GCS_OBJ_PATH,
bucket=BUCKET,
task_id="run_operator",
)
Use Jinja templating with
client_ids
, query
, attributes
, bucket
, obj
, impersonation_chain
parameters which allow you to dynamically determine values.
The result is saved to XCom, which allows the result to be used by other operators.
Upload Google Ads Accounts to GCS¶
To upload Google Ads accounts to Google Cloud Storage bucket use the
GoogleAdsListAccountsOperator
.
list_accounts = GoogleAdsListAccountsOperator(
task_id="list_accounts", bucket=BUCKET, object_name=GCS_ACCOUNTS_CSV
)
Use Jinja templating with
client_ids
, query
, attributes
, bucket
, obj
, impersonation_chain
parameters which allow you to dynamically determine values.
The result is saved to XCom, which allows the result to be used by other operators.