Databricks DE · Topic 6.1

Lakeflow Designer

A visual, no-code, AI-native tool to build data pipelines on a drag-and-drop canvas — output is production-ready Python code, governed by Unity Catalog and versionable in Git. This deep dive pairs the UI flow with the generated code.

no-code canvasGenie Code (NL)generates PythonGit-versionableUC-governed

The one-liner

Lakeflow Designer = drag-and-drop + natural-language data prep where the visual workflow compiles to production-ready Python code, governed by Unity Catalog and versionable in Git — no "rebuild the prototype" step. (⚠️ verify preview/GA status in the docs.)
🧩 Analogy: a no-code app builder for pipelines — like dragging blocks in a website builder, but every block generates real, governed pipeline code underneath (not a throwaway prototype).

Build on the canvas — click operators to add them

▸ drop operators between Source and Output, then "Generate code"

+ Filter + Join + Aggregate + Reshape
Source▸Output
# generated, UC-governed Python appears here

1 · Build it — UI steps

  1. Open Jobs & Pipelines (or + New) → create a Lakeflow Designer draft.
  2. Add sources — pick UC tables/files from the catalog onto the canvas.
  3. Drop transform operators (filter, join, aggregate, reshape — 6.2) and wire source → output; preview data at any node.
  4. Optionally use Genie Code to generate/edit a step from a prompt (6.3).
  5. Publish — choose the destination UC catalog/schema; Designer creates the tables + underlying pipeline.
💡 Data stays in place on Databricks, governed by Unity Catalog from the first step — lineage & permissions apply.

2 · The generated code (the production payoff)

Every visual workflow compiles to production-ready Python you can inspect, review in a PR, and commit to Git — the same artifact an engineer would write.

# Illustrative of what Designer generates for "monthly revenue per region"
from pyspark import pipelines as dp

@dp.materialized_view(comment="Monthly revenue per region (generated by Lakeflow Designer)")
def monthly_revenue_by_region():
    orders  = spark.read.table("main.sales.orders").where("amount > 0")   # Filter op
    regions = spark.read.table("main.sales.dim_region")                  # Source
    return (orders.join(regions, "region_id")                            # Join op
                  .groupBy("region", "month").sum("amount"))             # Aggregate op

Because it's real code, it's versionable (Git), reviewable in PRs, and deployable via Asset Bundles — it behaves like any code-authored pipeline.

3 · Two ways to build — click each

Drop built-in operators (filter, aggregate, join, reshape — 6.2) and wire them into a flow. Add your own user-defined operators via Python/SQL UDFs for custom logic.
Type intent — e.g. "monthly revenue per region" — and Genie Code (6.3) generates or updates the transformation. The result is the same governed Python as the drag-and-drop path.
💡 Either way, the output is production-ready Python governed by Unity Catalog — it inherits lineage & permissions and can be committed to Git.

When to use it vs. drop to code

Use Lakeflow DesignerAuthor SDP code directly
Analyst / citizen-engineer data prepComplex/custom logic, advanced state
Fast, visual prototyping that shipsHeavy parameterization, libraries
NL-assisted explorationFine-grained control / testing
Not either/or: Designer generates the code, so a team can start visual and hand the generated Python to engineering to extend.

Why it matters

📊 Real-world use case: an analyst drags Salesforce + orders onto the canvas, types "monthly revenue per region," and ships it — the generated pipeline is UC-governed, lands in Git, and runs like any other Lakeflow pipeline, no engineering hand-off.

Uses, edge cases & limitations

Common gotchas