CHAPTER 15 STUDIO
Orchestration is just materializing a graph, in the right order.
Cron runs scripts on a clock. An orchestrator runs an asset graph: it knows what depends on what, builds in dependency order, skips work already done, and tells you exactly what breaks when one node fails. These three labs make each of those ideas visible. They are the browser face of a 150-line pure-Python orchestrator built from scratch in Chapter 15.
LAB 1: ASSET GRAPH MATERIALIZER
Click Materialize and watch the wave sweep the graph in dependency order.
This is the trading platform's data flow as an asset graph. Hit Materialize: each node goes idle, then running, then materialized, but only once all of its upstreams are done. A node cannot jump ahead of its dependencies. That ordering, computed by a topological sort, is the core of every orchestrator.
Built from notebook 15.1. The order is a Kahn topological sort: start from sources, peel inward, never run a node before its upstreams.
LAB 2: BACKFILL AND PARTITIONS
Fill the missing partitions. Then run it again and watch it do nothing.
Each row is an asset; each column is a day. Filled cells are already materialized. Pick a date range and click Backfill: only the missing cells fill, in dependency order, top to bottom per day. Run the same backfill a second time and every cell is skipped. That no-op is idempotency, the property cron never had.
Built from notebook 15.2. A materialization log records every (asset, day) pair, so a rerun over a complete range is a guaranteed no-op.
LAB 3: FAILURE BLAST RADIUS
Fail a node. Watch everything downstream go dark.
Same graph as Lab 1. Click any node to fail it. It turns red; its downstream descendants turn grey, because an orchestrator will not build an asset on a failed input. The panel reports the blast radius: the count and names of everything skipped. Toggle retries to see a transient failure absorbed before it propagates.
- click a node to fail itidle
Built from notebook 15.5. The blast radius equals the graph descendants of the failed node, the Chapter 12 lineage-risk descriptor, computed live.
CHAPTER 15 NOTEBOOK PATH
Each lab has notebooks behind it.
The studio is the surface. The chapter builds the orchestrator from scratch, points it at the repo's own dbt project and trading platform, maps it to Dagster, and names the failure modes.
From cron to a tiny asset graph
The four failures of cron. Then `AssetGraph`, topological materialization, and cycle detection in pure Python.
Partitions, backfills, sensors
Idempotent backfills over a date range. A polling sensor and a freshness policy on a simulated clock.
The repo's dbt project as a graph
Parse the real `dbt/dbt_dq` models for ref() edges and orchestrate them. Lineage and orchestration, the same DAG.
Failure, retries, blast radius
Skip-on-failure, a retry policy, and the Chapter 12 blast-radius descriptor applied to a live run.
Dagster bridge and the capstone
Every toy concept mapped to the real Dagster API. Then the trading platform's data, orchestrated by day.
When the schedule lies
Silent partial failure, sensor storms, backfill thundering herd, and retries masking a data bug. Read before you ship.