Files
airflow/dags/business/dag_didata_sync.py

17 lines
635 B
Python

from airflow.providers.standard.operators.bash import BashOperator
import pendulum
from airflow import DAG
# with DAG(
# dag_id="didata_sync_dag",
# # 每月28日3点整分运行
# schedule="0 3 28 * *",
# start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
# catchup=True,
# description="地数相关数据同步type: district或office, 不填默认同步全部"
# ) as dag:
# t1 = BashOperator(
# task_id='didata_sync_dag',
# bash_command='python /opt/airflow/dags/repo/dags/business/business/didata_sync.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
# )
# t1