修复不传参异常

This commit is contained in:
Jian Shen
2022-08-05 11:10:19 +08:00
parent f3fe8d1e39
commit 35cd52ad5c
+5 -5
View File
@@ -17,22 +17,22 @@ with DAG(
) as dag: ) as dag:
t1 = BashOperator( t1 = BashOperator(
task_id='mt_comm', task_id='mt_comm',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/comm.py {{ dag_run.conf["output_date"] }}', bash_command='python /opt/airflow/dags/repo/dags/mt/supply/comm.py {{dag_run.conf["output_date"] if "output_date" in dag_run.conf}}',
) )
t2 = BashOperator( t2 = BashOperator(
task_id='mt_rent_avg_price', task_id='mt_rent_avg_price',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/rent_avg_price.py {{ dag_run.conf["output_date"] }}', bash_command='python /opt/airflow/dags/repo/dags/mt/supply/rent_avg_price.py {{dag_run.conf["output_date"] if "output_date" in dag_run.conf}}',
) )
t3 = BashOperator( t3 = BashOperator(
task_id='mt_facilitys', task_id='mt_facilitys',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/facilitys.py {{ dag_run.conf["output_date"] }}', bash_command='python /opt/airflow/dags/repo/dags/mt/supply/facilitys.py {{dag_run.conf["output_date"] if "output_date" in dag_run.conf}}',
) )
t4 = BashOperator( t4 = BashOperator(
task_id='mt_deal', task_id='mt_deal',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/deal.py {{ dag_run.conf["output_date"] }}', bash_command='python /opt/airflow/dags/repo/dags/mt/supply/deal.py {{dag_run.conf["output_date"] if "output_date" in dag_run.conf}}',
) )
t5 = BashOperator( t5 = BashOperator(
task_id='mt_stat', task_id='mt_stat',
bash_command='python /opt/airflow/dags/repo/dags/mt/supply/data_stat.py {{ dag_run.conf["output_date"] }}', bash_command='python /opt/airflow/dags/repo/dags/mt/supply/data_stat.py {{dag_run.conf["output_date"] if "output_date" in dag_run.conf}}',
) )
t1 >> t2 >> t3 >> t4 >> t5 t1 >> t2 >> t3 >> t4 >> t5