tests.system.google.ads.example_ads¶
Example Airflow DAG that shows how to use GoogleAdsToGcsOperator.
In order to run this test, make sure you followed steps: 1. In your GCP project create a service account that will be used to operate on Google Ads. The name should be in format google-ads-service-account@{PROJECT_ID}.iam.gserviceaccount.com 2. Generate a key for this service account and store it in the Secret Manager under the name google_ads_service_account_key. 3. Give this service account Editor permissions. 4. Make sure Google Ads API is enabled in your GCP project. 5. Login to https://ads.google.com 6. In the Admin section go to Access and Security and give your GCP service account Admin permissions. 7. Store values of your developer token and client ID to Secret Manager under names google_ads_client_id and google_ads_developer_token.
Attributes¶
Functions¶
|
|
Module Contents¶
- tests.system.google.ads.example_ads.GOOGLE_ADS_SERVICE_ACCOUNT_KEY = 'google_ads_service_account_key'[source]¶
- tests.system.google.ads.example_ads.GOOGLE_ADS_DEVELOPER_TOKEN = 'google_ads_developer_token'[source]¶
- tests.system.google.ads.example_ads.GCS_OBJ_PATH = 'gs://bucket_ads_Uninferable/google-ads-api-results.csv'[source]¶
- tests.system.google.ads.example_ads.QUERY = Multiline-String[source]¶
Show Value
""" SELECT segments.date, customer.id, campaign.id, ad_group.id, ad_group_ad.ad.id, metrics.impressions, metrics.clicks, metrics.conversions, metrics.all_conversions, metrics.cost_micros FROM ad_group_ad WHERE segments.date >= '2020-02-01' AND segments.date <= '2020-02-29' """
- tests.system.google.ads.example_ads.CONNECTION_GLOUD_ID = 'connection_cloud_google_ads_Uninferable'[source]¶