Add destination table when initializing query. If not added, data is initialized in a temporary table. (#4193)
Co-authored-by: Lucia Vargas <lvargas@mozilla.com> Co-authored-by: Anna Scholtz <anna@scholtzan.net>
This commit is contained in:
Родитель
6c27be8a19
Коммит
7d5f17c1aa
|
@ -1281,9 +1281,11 @@ def initialize(name, sql_dir, project_id, dry_run):
|
|||
with open(init_file) as init_file_stream:
|
||||
init_sql = init_file_stream.read()
|
||||
dataset = Path(init_file).parent.parent.name
|
||||
destination_table = query_file.parent.name
|
||||
job_config = bigquery.QueryJobConfig(
|
||||
dry_run=dry_run,
|
||||
default_dataset=f"{project}.{dataset}",
|
||||
destination=f"{project}.{dataset}.{destination_table}",
|
||||
)
|
||||
|
||||
if "CREATE MATERIALIZED VIEW" in init_sql:
|
||||
|
|
Загрузка…
Ссылка в новой задаче