* Expose Ad Group tables

* Generate DAG
This commit is contained in:
Frank Bertsch 2023-07-19 11:09:33 -04:00 коммит произвёл GitHub
Родитель bb2e48fa3b
Коммит 179b427518
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 78 добавлений и 0 удалений

Просмотреть файл

@ -67,6 +67,18 @@ with DAG(
task_concurrency=1,
)
google_ads_derived__daily_ad_group_stats__v1 = bigquery_etl_query(
task_id="google_ads_derived__daily_ad_group_stats__v1",
destination_table="daily_ad_group_stats_v1",
dataset_id="google_ads_derived",
project_id="moz-fx-data-shared-prod",
owner="frank@mozilla.com",
email=["frank@mozilla.com", "telemetry-alerts@mozilla.com"],
date_partition_parameter=None,
depends_on_past=False,
task_concurrency=1,
)
google_ads_derived__daily_campaign_stats__v1 = bigquery_etl_query(
task_id="google_ads_derived__daily_campaign_stats__v1",
destination_table="daily_campaign_stats_v1",

Просмотреть файл

@ -0,0 +1,7 @@
CREATE OR REPLACE VIEW
`moz-fx-data-shared-prod.google_ads.daily_ad_group_stats`
AS
SELECT
*
FROM
`moz-fx-data-shared-prod.google_ads_derived.daily_ad_group_stats_v1`

Просмотреть файл

@ -0,0 +1,17 @@
friendly_name: Daily Ad Group Stats
description: |-
Daily ad group stats for Google Ads UAC ad groups.
This is written directly from Fivetran's ETL.
https://github.com/fivetran/dbt_google_ads
owners:
- frank@mozilla.com
labels:
incremental: false
scheduling:
dag_name: bqetl_fivetran_google_ads
depends_on_past: false
date_partition_parameter: null
bigquery:
clustering:
fields: ["date"]
references: {}

Просмотреть файл

@ -0,0 +1,5 @@
SELECT
date_day AS `date`,
* EXCEPT (date_day)
FROM
`moz-fx-data-bq-fivetran.google_ads_google_ads.google_ads__ad_group_report`

Просмотреть файл

@ -0,0 +1,37 @@
fields:
- mode: NULLABLE
name: date
type: DATE
- mode: NULLABLE
name: account_name
type: STRING
- mode: NULLABLE
name: account_id
type: INTEGER
- mode: NULLABLE
name: campaign_name
type: STRING
- mode: NULLABLE
name: campaign_id
type: INTEGER
- mode: NULLABLE
name: ad_group_name
type: STRING
- mode: NULLABLE
name: ad_group_id
type: INTEGER
- mode: NULLABLE
name: ad_group_status
type: STRING
- mode: NULLABLE
name: ad_group_type
type: STRING
- mode: NULLABLE
name: spend
type: FLOAT
- mode: NULLABLE
name: clicks
type: INTEGER
- mode: NULLABLE
name: impressions
type: INTEGER