# Lakeflow Pipelines

> A Databricks tool that builds tables from the SQL you write. It was Delta Live Tables.

**Field:** Data Engineering  
**Category:** Platforms  
**Also known as:** Delta Live Tables, Lakeflow Spark Declarative Pipelines, Lakeflow Declarative Pipelines, Spark Declarative Pipelines

## Think of it like

It is like a recipe card. You say what the dish should be, and the cook works out the steps.

## Definition

Lakeflow Pipelines is the Databricks tool for building pipelines by saying what each table should hold. It used to be called Delta Live Tables. You write one query in SQL or Python for each table, and the tool works out the order to build them in. A streaming table takes in new rows as they arrive. A materialized view keeps the answer to a query up to date. Rules called expectations can flag or drop bad rows.

## Example

A team writes three short queries: raw orders, clean orders and daily totals. The pipeline builds them in the right order and drops 120 rows with no id.

## Example code

```sql
CREATE OR REFRESH STREAMING TABLE orders_clean (
  CONSTRAINT has_id EXPECT (order_id IS NOT NULL) ON VIOLATION DROP ROW
) AS SELECT * FROM STREAM orders_raw;
```

One table and one rule. Rows with no order id are dropped before they land.

## Why it matters

You write what each table holds, not every step to build it. The tool handles the order and the new rows.

## Common mistake

Thinking a plain expectation stops bad rows. On its own it only counts them. Add DROP ROW, or FAIL UPDATE to stop the run.

## Three principles

- **Declarative.** Say what, not how.
- **Two kinds of table.** Streaming tables and materialized views.
- **Expectations.** Rules that warn, drop or fail.

## Related terms

- [Databricks](https://learn.benibix.com/term/data/databricks)
- [Lakeflow Jobs](https://learn.benibix.com/term/data/lakeflow-jobs)
- [Data Pipeline](https://learn.benibix.com/term/data/data-pipeline)
- [Data Quality Check](https://learn.benibix.com/term/data/data-quality-check)
- [Stream Processing](https://learn.benibix.com/term/data/stream-processing)
- [Delta Lake](https://learn.benibix.com/term/data/delta-lake)
- [dbt (Data Build Tool)](https://learn.benibix.com/term/data/dbt)

## Told apart from

- [Lakeflow Pipelines vs dbt](https://learn.benibix.com/compare/lakeflow-pipelines-vs-dbt): People think Lakeflow Pipelines is Databricks' own dbt, and it is not quite. Both let you write SQL that says what each table should hold. dbt runs that SQL in batches, in almost any warehouse. Lakeflow Pipelines runs only in Databricks, and it can keep streaming tables fed as new rows arrive. Its rules can drop bad rows on the way in.

![Raw order files flow left to right into a streaming table called orders_clean, then into a materialized view called daily_totals. A rule on the streaming table, order_id is not null, sends rows without an id to a dropped pile. A note under it says you write what each table holds and the pipeline works out the order.](https://learn.benibix.com/diagrams/dat3-declarative-pipeline.svg)

---

Source: https://learn.benibix.com/term/data/lakeflow-pipelines
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
