GoogleAdsHook

Google

Hook for the Google Ads API.

View Source

Last Updated: Mar. 6, 2021

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

gcp_conn_idstrThe connection ID with the service account details.
google_ads_conn_idstrThe connection ID with the details of Google Ads config.yaml file.

Documentation

Hook for the Google Ads API.

This hook requires two connections:

  • gcp_conn_id - provides service account details (like any other GCP connection)

  • google_ads_conn_id - which contains information from Google Ads config.yaml file in the extras. Example of the extras:

{ "google_ads_client": { "developer_token": "{{ INSERT_TOKEN }}", "path_to_private_key_file": null, "delegated_account": "{{ INSERT_DELEGATED_ACCOUNT }}" } }

The path_to_private_key_file is resolved by the hook using credentials from gcp_conn_id. https://developers.google.com/google-ads/api/docs/client-libs/python/oauth-service

See also

For more information on how Google Ads authentication flow works take a look at: https://developers.google.com/google-ads/api/docs/client-libs/python/oauth-service

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

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?