airflowDAGs are stored in a single centrally located folder, defined by theairflow.cfgfile in the~/airflow/HOME folder and theAIRFLOW_HOMELinux environment variable (in some combination?).- When
airflowis initially installed, this is configured to be~/airflow/dags/. - (In
datablocks, I will want to write a run hook in the package__init__.pythat moves the folder reference to the currently installed folder.) airflow list_dagsis a command that lists known DAGs. It initially contains many tutorial DAGs that are included with the package on install.airflow list_tasks {{ filename }}lists tasks in the chosen DAG.- Adding the
--treeoperator lists tasks in the shape of a tree. In this output, the indentation reflects the dependence of endpoint tasks on tasks that come before them. - By default,
airflowuses a sequential execution engine. It can be configured to use...well, there are a lot of options. To get parallel execution, you will need to configure for extras. - To test-run a DAG,
airflow test {{ dag_id }} {{ task_id}} date, where date is a datetime that you want to run the task on. e.g.airflow test tutorial print_date 2015-06-01. Can also be e.g.2017-1-23T10:34. - FYI, there is no way to delete a DAG directly. Instead, you have to use a custom script. See here.
- Due to this bug, the management server is broken right now
when
airflowis deployed in localhost (default) mode.- Deploy it with
airflow webserver --debug. *&(backgrounding) is helpful. - Note that when you
KeyboardInterruptthis, the socket connection is not closed in the OS (explanation here). To free the port, you need to kill the leftover process. Easiest way is by doingsudo fuser -k 8080/tcp. - This bug is fixed in master, RC
1.9.0. But I am using the latest release,1.8.0... - The workaround is to generate and self-sign an SSL certificate private/public key pair, and then associate that
with
airflowwebserver via these instructions. cf. here. - However, this results in a different error:
SSL Wrong Version Number. The site (link) still doesn't work.
- Deploy it with
airflow backfill {{ dag_id}} -s {{ start date }} [ -e {{end date}} ]runs the entire DAG on a range of simulated dates. The end date is optional.airflowusessqliteas its backend by default, with aSequentialExecutorrunning scheduled jobs. With more configuration, you can get something that runs in parallel.
ResidentMario/airflow-tests
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|