Making Data Engineering Declarative

Michael Armbrust, Ali Ghodsi, Reynold Xin, Vuk Ercegovac, Sourav Chatterji, Eun-Gyu Kim, Paul Lappas, Yannis Papakonstantinou, Yingyi Bu, Yuhong Chen, Yijia Cui, Rahul Govind, Aakash Japi, Kiavash Kianfar, Xi Liang, Jon Mio, Mukul Murthy, Supun Nakandala, Andreas Neumann, Nitin Sharma, Yannis Sismanis, Justin Tang, Joseph Torres, Min Yang, Li Zhang, Bilal AslamCIDR 2023

Abstract

Modern data engineering often relies on fragmented, imperative scripts that are difficult to optimize and maintain. Databricks introduces Delta Live Tables (DLT), a framework that shifts data engineering from managing a "black box" of SQL scripts to defining holistic, declarative pipelines. By treating the entire data flow as a single unit of incrementally maintained Materialized Views, DLT enables global optimizations and built-in data quality, resulting in over 50% cost reductions compared to traditional methods.

Introduction: The Efficiency Gap in Modern Data Stacks

In modern cloud data stacks, preparing data for analytics and machine learning involves complex Directed Acyclic Graphs (DAGs) of transformations. Traditionally, these are handled in two distinct stages: Ingestion (fetching raw data from sources like Kafka or Kinesis) and Downstream ELT (cleaning, aggregating, and refining data for end-users).

The authors identify a major efficiency gap in this approach: most current frameworks treat these pipelines as a series of independent CREATE TABLE AS (CTAS) statements. Because the underlying processing engine only sees one query at a time, it cannot optimize the pipeline globally. This leads to several critical pain points:

  1. Manual Incrementalization: Engineers must manually write logic to update only new data, which is error-prone and complex.
  2. Suboptimal Resource Use: Without a global view, the system cannot effectively auto-scale or parallelize tasks across the entire DAG.
  3. Fragile CI/CD: Changing code in a large pipeline makes it difficult to determine which downstream tables need to be evolved.
  4. Ad-hoc Data Quality: Quality checks are often external scripts rather than integrated parts of the data definition.

The Delta Live Tables (DLT) Framework

The paper proposes Delta Live Tables (DLT), which replaces independent SQL statements with a declaratively specified pipeline. This framework shifts the focus from how to process data to what the final state should look like.

Architecture of a declarative data pipeline from ingestion to downstream ELT.

Key technical pillars of DLT include:

  • SQL Materialized Views (MVs): Instead of static tables, DLT uses MVs that are automatically and incrementally maintained by the system.
  • Catalyst-Powered Incrementalization: It leverages the Spark Catalyst query rewriter to automatically transform complex, full-scope SQL queries into efficient incremental update plans.
  • Pipeline-Aware Orchestration: Because DLT understands the entire DAG, it can holistically optimize resource allocation. It uses "pipeline-aware parallelism" to scale infrastructure based on the needs of the whole flow rather than a single step.
  • Declarative Expectations: Users define data quality "expectations" (constraints) directly within the pipeline code. The system monitors these automatically during execution and takes action based on predefined policies.

Key Insights: Global Optimization and Intent

The core philosophy of DLT is the Power of Intent. By telling the system the desired final state, the engine gains the freedom to find the most efficient path to that state. Traditional optimizers are "blind" to the pipeline; DLT’s holistic approach allows it to reduce latency and maximize infrastructure utilization in ways a single-query optimizer never could.

Furthermore, by treating the entire pipeline as a single declarative specification, DLT simplifies CI/CD. The system can automatically detect which parts of the state (Materialized Views) are affected by a code change and evolve them accordingly. Moving data quality from an "after-the-fact" check to a first-class citizen ensures that "dirty data" is caught and handled efficiently without manual intervention.

Quantitative Results and Real-World Impact

The paper's findings are based on observations from thousands of Databricks customers processing data in the cloud. The authors provide metadata about these real-world workloads to illustrate complexity: the average customer pipeline DAG contains more than 12 nodes, while the top 10% of complex pipelines contain over 26 nodes.

The primary quantitative highlight is the efficiency gain from global optimization:

  • Cost Reduction: In cases of fully incremental downstream ELT, DLT’s pipeline-aware parallelism and autoscaling deliver a >50% cost reduction compared to executing the same operations as independent, disconnected statements.
  • Productivity: The declarative approach significantly improves engineering productivity by automating the "plumbing" of incrementalization and orchestration.

Conclusion and Future Work

As an industrial vision, this work focuses on the high-level architecture of declarative data engineering. While the paper does not deeply detail every specific query rewriting logic for all SQL joins, it demonstrates the clear benefits of a holistic pipeline view. The authors suggest that declarative pipelines open a "wide spectrum of novel optimizations," pointing toward future research in automated pipeline evolution and more sophisticated resource scheduling based on declarative hints.

Summary updated

BibTeX
@inproceedings{armbrust2023making,
  author = {Michael Armbrust and Ali Ghodsi and Reynold Xin and Vuk Ercegovac and Sourav Chatterji and Eun-Gyu Kim and Paul Lappas and Yannis Papakonstantinou and Yingyi Bu and Yuhong Chen and Yijia Cui and Rahul Govind and Aakash Japi and Kiavash Kianfar and Xi Liang and Jon Mio and Mukul Murthy and Supun Nakandala and Andreas Neumann and Nitin Sharma and Yannis Sismanis and Justin Tang and Joseph Torres and Min Yang and Li Zhang and Bilal Aslam},
  title = {{Making Data Engineering Declarative}},
  booktitle = {CIDR},
  year = {2023},
}
Figure