小编SAT*_*JEE的帖子

Airflow DAG 状态为成功,但任务状态 Dag 尚未运行

我正在使用气流 2.3.4 ;我用配置触发。当我对配置值进行硬编码时,该 DAG 成功运行。但是在传递配置后触发时,我的任务永远不会启动,但状态变为绿色(成功)。请帮助我了解出了什么问题!

from datetime import datetime, timedelta
from airflow import DAG
from pprint import pprint
from airflow.operators.python import PythonOperator
from operators.jvm import JVMOperator

args = {
    'owner': 'satyam',
    'depends_on_past': False,
    'start_date': datetime.utcnow(),
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
}

dag_params = {
    'dag_id': 'synthea_etl_end_to_end_with_config',
    'start_date': datetime.utcnow(),
    'end_date': datetime(2025, 2, 5),
    'default_args': args,
    'schedule_interval': timedelta(hours=4)
}


dag = DAG(**dag_params)

# [START howto_operator_python]


def print_context(ds, **kwargs):
    """Print the Airflow context and ds variable from the context."""
    pprint(kwargs)
    pprint(ds)
    return 'Whatever you …
Run Code Online (Sandbox Code Playgroud)

airflow

1
推荐指数
1
解决办法
2722
查看次数

标签 统计

airflow ×1