示例 Airflow DAG,展示如何使用 GoogleAdsToGcsOperator。
模块内容
-
tests.system.google.ads.example_ads.ENV_ID[源码]
-
tests.system.google.ads.example_ads.PROJECT_ID[源码]
-
tests.system.google.ads.example_ads.DAG_ID = 'example_google_ads'[源码]
-
tests.system.google.ads.example_ads.BUCKET_NAME[源码]
-
tests.system.google.ads.example_ads.CLIENT_IDS = ['1111111111', '2222222222'][源码]
-
tests.system.google.ads.example_ads.GCS_OBJ_PATH = 'folder_name/google-ads-api-results.csv'[源码]
-
tests.system.google.ads.example_ads.GCS_ACCOUNTS_CSV = 'folder_name/accounts.csv'[源码]
-
tests.system.google.ads.example_ads.QUERY = 多行字符串[源码]
显示值
"""
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.create_bucket[源码]
-
tests.system.google.ads.example_ads.test_run[源码]