fix: Update table names in DAG microsoft_store (#2029)
* Update table names * Updated with the suggestion to make it easier to maintain. * fix(dag): Remove space. * Adding _v1 to the table name in the query * f string
This commit is contained in:
Родитель
8a4177a423
Коммит
723be3a7af
|
@ -63,57 +63,26 @@ with DAG(
|
|||
doc_md=docs,
|
||||
tags=tags,
|
||||
) as dag:
|
||||
|
||||
microsoft_derived__app_acquisitions__v1 = GKEPodOperator(
|
||||
task_id="microsoft_derived__app_acquisitions__v1",
|
||||
secrets=[
|
||||
microsoft_client_id,
|
||||
microsoft_client_secret,
|
||||
microsoft_tenant_id,
|
||||
microsoft_store_app_list,
|
||||
],
|
||||
arguments=[
|
||||
"python",
|
||||
"sql/moz-fx-data-shared-prod/microsoft_derived/microsoft_app_acquisitions_v1/query.py",
|
||||
"--date={{ ds }}",
|
||||
],
|
||||
image="gcr.io/moz-fx-data-airflow-prod-88e0/bigquery-etl:latest",
|
||||
owner="mhirose@mozilla.com",
|
||||
email=["mhirose@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
)
|
||||
|
||||
microsoft_derived__app_conversions__v1 = GKEPodOperator(
|
||||
task_id="microsoft_derived__app_conversions__v1",
|
||||
secrets=[
|
||||
microsoft_client_id,
|
||||
microsoft_client_secret,
|
||||
microsoft_tenant_id,
|
||||
microsoft_store_app_list,
|
||||
],
|
||||
arguments=[
|
||||
"python",
|
||||
"sql/moz-fx-data-shared-prod/microsoft_derived/microsoft_app_conversions_v1/query.py",
|
||||
"--date={{ ds }}",
|
||||
],
|
||||
image="gcr.io/moz-fx-data-airflow-prod-88e0/bigquery-etl:latest",
|
||||
owner="mhirose@mozilla.com",
|
||||
email=["mhirose@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
)
|
||||
|
||||
microsoft_derived__app_installs__v1 = GKEPodOperator(
|
||||
task_id="microsoft_derived__app_installs__v1",
|
||||
secrets=[
|
||||
microsoft_client_id,
|
||||
microsoft_client_secret,
|
||||
microsoft_tenant_id,
|
||||
microsoft_store_app_list,
|
||||
],
|
||||
arguments=[
|
||||
"python",
|
||||
"sql/moz-fx-data-shared-prod/microsoft_derived/microsoft_app_installs_v1/query.py",
|
||||
"--date={{ ds }}",
|
||||
],
|
||||
image="gcr.io/moz-fx-data-airflow-prod-88e0/bigquery-etl:latest",
|
||||
owner="mhirose@mozilla.com",
|
||||
email=["mhirose@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
table_names = (
|
||||
"app_acquisitions",
|
||||
"app_conversions",
|
||||
"app_installs",
|
||||
)
|
||||
for table in table_names:
|
||||
GKEPodOperator(
|
||||
task_id=f"microsoft_derived__{table}__v1",
|
||||
secrets=[
|
||||
microsoft_client_id,
|
||||
microsoft_client_secret,
|
||||
microsoft_tenant_id,
|
||||
microsoft_store_app_list,
|
||||
],
|
||||
arguments=[
|
||||
"python",
|
||||
f"sql/moz-fx-data-shared-prod/microsoft_derived/{table}_v1/query.py",
|
||||
"--date={{ ds }}",
|
||||
],
|
||||
image="gcr.io/moz-fx-data-airflow-prod-88e0/bigquery-etl:latest",
|
||||
owner="mhirose@mozilla.com",
|
||||
email=["mhirose@mozilla.com", "telemetry-alerts@mozilla.com"],
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче