From 1a516f7b1b0325aa0ddc5654dfecc6de409ed5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Thu, 19 Jan 2023 17:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BC=B0=E5=80=BC=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/jh/price_exception_dag.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dags/jh/price_exception_dag.py b/dags/jh/price_exception_dag.py index 7fd09c5..5f2f3af 100644 --- a/dags/jh/price_exception_dag.py +++ b/dags/jh/price_exception_dag.py @@ -11,12 +11,13 @@ with DAG( description="建行每月价格异常检测脚本,默认检测本月与上月差异, 若对比上月与前月价格,设置type=\"202210\"(前月日期即可) 若输出样本存在与否,设置type=sample" ) as dag: t1 = BashOperator( - task_id='price_exception', - bash_command='python /opt/airflow/dags/repo/dags/jh/price/price_exception.py {{dag_run.conf["type"] if "type" in dag_run.conf}}', - ) - t2 = BashOperator( task_id='price_evaluation', bash_command='python /opt/airflow/dags/repo/dags/jh/price/price_evaluation.py {{dag_run.conf["year_month"] if "year_month" in dag_run.conf}}', ) + t2 = BashOperator( + task_id='price_exception', + bash_command='python /opt/airflow/dags/repo/dags/jh/price/price_exception.py {{dag_run.conf["type"] if "type" in dag_run.conf}}', + ) + t1 >> t2