Require destination_table or sql_file_path (#1310)
This commit is contained in:
Родитель
682c3bad6d
Коммит
c48bef314c
|
@ -207,6 +207,11 @@ class Task:
|
|||
|
||||
if self.destination_table == DEFAULT_DESTINATION_TABLE_STR:
|
||||
self.destination_table = f"{self.table}_{self.version}"
|
||||
|
||||
if self.destination_table is None and self.sql_file_path is None:
|
||||
raise ValueError(
|
||||
"One of destination_table or sql_file_path must be specified"
|
||||
)
|
||||
else:
|
||||
raise ValueError(
|
||||
"query_file must be a path with format:"
|
||||
|
|
|
@ -29,6 +29,7 @@ with DAG(
|
|||
email=["frank@mozilla.com"],
|
||||
date_partition_parameter="submission_date",
|
||||
depends_on_past=False,
|
||||
sql_file_path="sql/org_mozilla_firefox/event_types_v1/query.sql",
|
||||
dag=dag,
|
||||
)
|
||||
|
||||
|
|
|
@ -9,4 +9,5 @@ labels:
|
|||
scheduling:
|
||||
dag_name: bqetl_fenix_event_rollup
|
||||
destination_table: null
|
||||
sql_file_path: 'sql/org_mozilla_firefox/event_types_v1/query.sql'
|
||||
referenced_tables: [['org_mozilla_firefox_derived', 'event_types_v1']]
|
||||
|
|
Загрузка…
Ссылка в новой задаче