Partition templates are not using `$` to separate partition designation. (#3757)
This commit is contained in:
Родитель
23dfc04e63
Коммит
9ab5bcbf3e
|
@ -357,15 +357,15 @@ class Task:
|
|||
):
|
||||
match metadata.bigquery.time_partitioning.type:
|
||||
case PartitionType.YEAR:
|
||||
partition_template = '{{ dag_run.logical_date.strftime("%Y") }}'
|
||||
partition_template = '${{ dag_run.logical_date.strftime("%Y") }}'
|
||||
case PartitionType.MONTH:
|
||||
partition_template = '{{ dag_run.logical_date.strftime("%Y%m") }}'
|
||||
partition_template = '${{ dag_run.logical_date.strftime("%Y%m") }}'
|
||||
case PartitionType.DAY:
|
||||
# skip for the default case of daily partitioning
|
||||
partition_template = None
|
||||
case PartitionType.HOUR:
|
||||
partition_template = (
|
||||
'{{ dag_run.logical_date.strftime("%Y%m%d%H") }}'
|
||||
'${{ dag_run.logical_date.strftime("%Y%m%d%H") }}'
|
||||
)
|
||||
case _:
|
||||
raise TaskParseException(
|
||||
|
|
|
@ -51,6 +51,6 @@ with DAG(
|
|||
owner="wstuckey@mozilla.com",
|
||||
email=["wstuckey@mozilla.com"],
|
||||
date_partition_parameter="submission_date",
|
||||
table_partition_template='{{ dag_run.logical_date.strftime("%Y%m") }}',
|
||||
table_partition_template='${{ dag_run.logical_date.strftime("%Y%m") }}',
|
||||
depends_on_past=False,
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче