日期参数化

This commit is contained in:
Jian Shen
2022-07-01 13:16:07 +08:00
parent 865e1ace85
commit 00ac5b0889
7 changed files with 82 additions and 69 deletions
+5 -5
View File
@@ -11,22 +11,22 @@ with DAG(
) as dag:
t1 = BashOperator(
task_id='mt_comm',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/comm.py',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/comm.py {{ dag_run.conf["output_date"] }}',
)
t2 = BashOperator(
task_id='mt_rent_avg_price',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/rent_avg_price.py',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/rent_avg_price.py {{ dag_run.conf["output_date"] }}',
)
t3 = BashOperator(
task_id='mt_facilitys',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/facilitys.py',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/facilitys.py {{ dag_run.conf["output_date"] }}',
)
t4 = BashOperator(
task_id='mt_deal',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/deal.py',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/deal.py {{ dag_run.conf["output_date"] }}',
)
t5 = BashOperator(
task_id='mt_stat',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/data_stat.py',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/data_stat.py {{ dag_run.conf["output_date"] }}',
)
t1 >> t2 >> t3 >> t4 >> t5