Fixed backfill query cli destination table name (#4123)
* Fixed desintation table * Added check for destination table
This commit is contained in:
Родитель
61b9b2ffe3
Коммит
4f6870d260
|
@ -490,13 +490,19 @@ def _backfill_query(
|
|||
backfill_date = backfill_date.strftime("%Y-%m-%d")
|
||||
if backfill_date not in exclude:
|
||||
if destination_table is None:
|
||||
destination_table = table
|
||||
destination_table = f"{project}.{dataset}.{table}"
|
||||
|
||||
if not no_partition:
|
||||
destination_table = f"{destination_table}${partition}"
|
||||
|
||||
if not QUALIFIED_TABLE_NAME_RE.match(destination_table):
|
||||
click.echo(
|
||||
"Destination table must be named like:" + " <project>.<dataset>.<table>"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
click.echo(
|
||||
f"Run backfill for {project}.{dataset}.{destination_table} "
|
||||
f"Run backfill for {destination_table} "
|
||||
f"with @{date_partition_parameter}={backfill_date}"
|
||||
)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче