feat: ClickHouse 彻底下线并平替为 MongoDB tmp 库,新增 ES 206 均价至 MongoDB 85 月度同步任务
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="sync_es_price_to_mongo_dag",
|
||||
# 每月3日凌晨2点整执行(在大部分上游爬取和ES清洗完毕后进行数据同步归档)
|
||||
schedule="0 2 3 * *",
|
||||
start_date=pendulum.datetime(2026, 8, 16, tz="Asia/Shanghai"),
|
||||
catchup=False,
|
||||
description="每月定时把 ES 206 上的 community 均价数据同步到 85 Mongo 的 average_statistics 表"
|
||||
) as dag:
|
||||
|
||||
sync_es_price_to_mongo = BashOperator(
|
||||
task_id='sync_es_price_to_mongo',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/sync_es_price_to_mongo.py {{dag_run.conf["month"] if "month" in dag_run.conf else ""}}',
|
||||
)
|
||||
Reference in New Issue
Block a user