A team maintains a production notebook that builds 20 related tables every night. Most of the notebook is hand-written code that runs the table builds in a fixed sequence. The transformations are standard ingestion and join patterns with no procedural logic.
The team wants to:
- stop maintaining code or configuration that sets the execution order, and have the platform work out the order from the relationships between tables
- let operations staff trace data from source to target
What should the team do?
The workload uses standard transformations, and the team wants automatic dependency management and lineage tracking. Lakeflow Spark Declarative Pipelines derive execution order from the relationships among tables, removing the need for manual orchestration code. Their built-in lineage tracking also helps operations staff trace data from source to target.
- Not correct: Split the notebook into one notebook per table and chain them with Lakeflow Jobs task dependencies. With job tasks you create the task dependencies yourself to control execution order, so the team would still maintain the ordering configuration instead of the platform deriving it.
- Not correct: Keep the notebook and add manual partitioning and caching to each table build. Partitioning and caching tune notebook performance. They leave the notebook's procedural execution order under developer control rather than having the platform derive it from table dependencies.
- Not correct: Keep the notebook and write the table relationships to an audit table. The notebook still executes step by step in the order the code specifies. Recording relationships does not make the platform determine the execution order, which Lakeflow pipelines do automatically.
- Correct: Redefine the tables as streaming tables and materialized views in a Lakeflow Spark Declarative Pipeline. The pipeline engine derives execution order from table dependencies without manual orchestration code and provides lineage tracking.