我正在使用Apache Airflow v1.10.3。尝试使用命令 trigger_dag 通过命令行触发dag时,我的参数 -sd 似乎被忽略了,并且正在使用配置文件中的默认值。>
我正在使用:
airflow trigger_dag -sd "/home/my/custom/dag/folder/dag/" my_test_1
my_test_1是dag的名称。
在返回错误 airflow.exceptions.DagNotFound:未找到Dag id my_test_1 之前,它会打印:
[2019-07-16 14:40:45,956] {__init__.py:51} INFO - Using executor SequentialExecutor
[2019-07-16 14:40:46,261] {__init__.py:305} INFO - Filling up the DagBag from /home/tfx/airflow/dags
Traceback (most recent call last):
File "/home/tfx/.local/bin/airflow", line 32, in <module>
args.func(args)
File "/home/tfx/.local/lib/python3.6/site-packages/airflow/utils/cli.py", line 74, in wrapper
return f(*args, **kwargs)
File "/home/tfx/.local/lib/python3.6/site-packages/airflow/bin/cli.py", line 233, in trigger_dag
execution_date=args.exec_date)
File "/home/tfx/.local/lib/python3.6/site-packages/airflow/api/client/local_client.py", line 33, in trigger_dag
execution_date=execution_date)
File "/home/tfx/.local/lib/python3.6/site-packages/airflow/api/common/experimental/trigger_dag.py", line 101, in trigger_dag
replace_microseconds=replace_microseconds,
File "/home/tfx/.local/lib/python3.6/site-packages/airflow/api/common/experimental/trigger_dag.py", line 38, in _trigger_dag
raise DagNotFound("Dag id {} not found".format(dag_id))
airflow.exceptions.DagNotFound: Dag id my_test_1 not found
请注意,它说从 / home / tfx / airflow / dags 填充DagBag,这是默认的dags文件夹,而不是通过命令行传递的文件夹
有人遇到相同的问题吗?
欢呼