修改日期
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="merge_dag",
|
||||
# 每日下午4点
|
||||
schedule_interval="0 16 * * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="每日融合文件检测, 若想指定检测某一天如20230314,则传参day='20230314'"
|
||||
) as dag:
|
||||
t1 = BashOperator(
|
||||
task_id='merge',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/jh/merge/merge.py {{dag_run.conf["day"] if "day" in dag_run.conf}}',
|
||||
)
|
||||
t1
|
||||
Reference in New Issue
Block a user