Answers:
airflow.operators.dummy_operator
Nope, confusingly enough the module
datetime
contains the classdatetime
, sodatetime.datetime
.
To have the follwing DAG working:
my_dag = DAG("sample_dag",
schedule_interval="0 0 * * *"
start_date=datetime.datetime(2020, 4, 29)
)
We would need to import the whole module, import datetime
.
In the original code you can thinks that from datetime import datetime
creates a shortcut to datetime.datetime
.
Nope, Airflow will pick up the Tasks in our DAG following the dependency tree we defined. If we remove
start >> end
they will be executed together. Withstart << end
we can reverse time and save the dinosaurs. Everything is possible with PythonYes, because it is after the DAG's
start_date
.
5.1 Nope, the first argument should be the task_id
, which is a string of text, not a DAG.
5.2 Nope, the unnamed argument should be before the named arguments.
Back to the original post.
Top comments (0)