
INDEX 449
data pipelines (continued)
pipeline graphs vs. sequential scripts 6–9
running using workflow managers 9–10
scheduling and executing 11–13
DbApiHook 153
db init 285
db upgrade 285
default_args parameter 174, 278, 314–315
dependencies 25–26, 85–112
basic 86–89
fan-in/-out dependencies 87–89
linear dependencies 86–87
branching 90–96
within DAGs 92–96
within tasks 90–92
chaining Python tasks with Taskflow API
108–112
simplifying Python tasks 109–111
when to use/not to use Taskflow API 111–112
complex and conflicting 222
conditional tasks 97–100
conditions within tasks 97
making tasks conditional 98–100
using built-in operators 100
easier management with containers 231
sharing data between tasks using XComs 104–108
using custom XCom backends 108
when to use/not to use XComs 107–108
trigger rules 100–103
defined 101
effect of failures 102
development, test, acceptance, production
(DTAP) environments, creating 219
directed acyclic graph (DAG) 5
Docker containers
creating Docker image 225–227
Kubernetes vs. 250–251
persisting data using volumes 227–230
running 224–225
running Airflow in 30–31
running tasks in 232–240
building DAG with Docker tasks 236–239
creating container images for tasks 233–236
Docker-based workflow 239–240
DockerOperator 232–233
Docker image
building DAGS into 300–301
creating 225–227
DockerOperator 155, 185, 230–232, 236–239, 245,
251
ds_nodash context variable 49, 434
ds variable 49, 205
DTAP (development, test, acceptance, produc-
tion) environments, creating 219
DummyOperator 96
E
ECSOperator 157, 356
edit operation 324
email argument 279, 315
email_on_failure argument 315
EmailOperator 26
encrypting
data at rest 327–329
traffic to webserver 333–339
end_date parameter 43, 47, 160
execute method 151, 175–179, 196–197, 209,
215–216, 219
execution_date argument 73, 130
execution_date_fn argument 130
execution dates 52–54
dynamic time references using 48–49
executing work in fixed-length intervals 52–54
execution_date variable 64–66, 73, 78, 98
execution_delta argument 130
execution_timeout argument 318
executor.open_slots 314
executor.queued_tasks 314
executor.running_tasks 314
executors
installing 290–302
CeleryExecutor 293–296
KubernetesExecutor 296–302
LocalExecutor 292–293
SequentialExecutor 291–292
selecting 284
task executor 290
external systems, testing and 208–214
ExternalTaskSensor 128–130, 134
F
FAB (Flask-AppBuilder) 323, 327, 333
factories, generating common patterns with
265–268
factory function 265
failures
effect on trigger rules 102
handling failing tasks 36–39
monitoring and handling 13–15
notifications 314–318
alerting within DAGs and operators
314–316
defining SLAs 316–318
fan-in/-out dependencies 87–89
Fernet keys, creating 328–329
FileSensor task 117–119
fixtures 202
Flask-AppBuilder (FAB) 323, 327, 333
frequency-based intervals 46