Difference between “airflow run” and “airflow test” in Airflow

笑着哭i 提交于 2019-12-10 13:42:07

问题


In Airflow, I have been using "airflow run" and "airflow test" but don't understand fully how they are different. What are their differences? Thanks!


回答1:


Reading through the docs myself, I see how it can be confusing.

Airflow Run will run a task instance as if you had triggered it directly through the UI. Perhaps most importantly the state will be recorded in the database and that state will be reflected in the UI as if the task had run under automatic circumstances

Airflow Test will skip any dependency (task, concurrency, pool etc) checks that may otherwise occur through an automatic run and run the task without updating the database. This means that you can "test" a task multiple times and it will execute, but the state in the database will not reflect runs triggered through the test command.




回答2:


According to the document information is as follows: Note that the airflow test command runs task instances locally, outputs their log to stdout (on screen), doesn’t bother with dependencies, and doesn’t communicate state (running, success, failed, . . . ) to the database. It simply allows testing a single task instance.



来源:https://stackoverflow.com/questions/51681325/difference-between-airflow-run-and-airflow-test-in-airflow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!