简化评级
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
"rate_dag",
|
||||
# 每月2日6点整分运行
|
||||
schedule_interval="0 6 2 * *",
|
||||
start_date=pendulum.datetime(2022, 7, 20, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="地数价格与消费评级 指定type: price或consumption, 不指定则只对消费评级"
|
||||
) as dag:
|
||||
t1 = BashOperator(
|
||||
task_id='rate_dag',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/rate.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
)
|
||||
t1
|
||||
Reference in New Issue
Block a user