Databricks for Data Engineers: What You Need to Know
Delta Lake, Unity Catalog, Structured Streaming, and how to actually use Databricks in production without paying for things you do not need.
Databricks shows up in a lot of senior data engineering job descriptions. It also shows up in a lot of data platform disasters where teams paid for a Spark cluster to run queries that would have been faster in dbt and DuckDB. Understanding what Databricks actually does well, and where it is genuinely the right tool, is the difference between looking competent and looking like you bought the hype.
What Databricks Is (and Is Not)
Databricks is a managed data and AI platform built on top of Apache Spark, running in your cloud account (AWS, Azure, or GCP). At its core, it provides collaborative notebooks, managed Spark clusters, a Delta Lake storage layer, and increasingly a full data governance and ML platform.
It is not a data warehouse. It does not replace Snowflake or BigQuery for typical analytical workloads. It is best understood as a platform for large-scale data processing and machine learning, with strong storage primitives through Delta Lake.
The distinction matters. If your team needs to run complex ETL on petabyte-scale data, train ML models on feature-rich datasets, or build streaming pipelines that process millions of events per second, Databricks is well-suited. If your team needs to answer business questions quickly with a reliable semantic layer, you probably want a warehouse.
Delta Lake: The Foundation
The most important thing Databricks ships is Delta Lake, an open-source storage layer that adds ACID transactions, schema enforcement, and time travel to Parquet files on cloud storage (S3, ADLS, GCS).
Before Delta Lake (and its cousins Apache Iceberg and Apache Hudi), working with data lakes meant dealing with eventual consistency, silent schema changes, and painful recovery when a job failed halfway through writing. Delta Lake fixes all of this.
Key Delta Lake Features
ACID transactions: Multi-step writes either complete or roll back. You can read a table while another job is writing to it without getting partial results.
Schema enforcement and evolution: Delta rejects writes that do not match the table schema by default. You opt in to schema evolution when you need it, preventing the silent corruption that plagues Parquet-on-S3 setups.
Time travel: Every table maintains a transaction log. You can query any previous version with VERSION AS OF or TIMESTAMP AS OF. This is genuinely useful for debugging, auditing, and recovering from bad writes.
Optimized writes: Databricks auto-optimizes file sizes (compaction) and collects statistics for partition pruning and data skipping. On large tables, this matters a lot for read performance.
-- Time travel: query yesterday's version of a table SELECT * FROM orders VERSION AS OF 42; -- Or by timestamp SELECT * FROM orders TIMESTAMP AS OF '2026-03-26 00:00:00'; -- Restore a table to a previous version RESTORE TABLE orders TO VERSION AS OF 42; -- See table history DESCRIBE HISTORY orders;
Unity Catalog: Governance at Scale
Unity Catalog is Databricks' data governance layer. It provides a three-level namespace (catalog.schema.table), column-level access control, data lineage, and auditing across all workspaces in an account.
The three-level namespace matters because it lets you organize data by environment (catalog), domain (schema), and entity (table). A common pattern:
-- Production catalog structure prod.bronze.raw_events prod.silver.cleaned_events prod.gold.daily_user_aggregates -- Development catalog (separate catalog, same schema names) dev.bronze.raw_events dev.silver.cleaned_events
Column masking is one of Unity Catalog's most useful features. You can define a masking policy on a sensitive column so that users who lack the right privilege see a redacted value, while authorized users see the real data, without any application-layer changes.
Lineage in Unity Catalog is captured automatically. When a job reads from Table A and writes to Table B, that dependency is recorded. The lineage graph is queryable via the UI or API, which makes impact analysis much faster than grepping through notebooks.
Structured Streaming
Databricks' Structured Streaming implementation is one of its strongest features. Built on Spark Structured Streaming, it treats a stream as an unbounded table and applies the same DataFrame API you use for batch processing.
Auto Loader is the recommended pattern for incrementally ingesting files from cloud storage. It uses checkpoint files to track which objects have been processed, handles schema inference and evolution, and is resilient to failures without reprocessing already-ingested data.
from pyspark.sql.functions import col, from_json
from pyspark.sql.types import StructType, StringType, TimestampType
schema = StructType().add("user_id", StringType()).add("event_type", StringType()).add("ts", TimestampType())
# Auto Loader: incrementally ingest from S3
df = (
spark.readStream
.format("cloudFiles")
.option("cloudFiles.format", "json")
.option("cloudFiles.schemaLocation", "/checkpoints/events/schema")
.load("s3://my-bucket/raw/events/")
)
# Write to Delta Lake with exactly-once semantics
(
df
.writeStream
.format("delta")
.option("checkpointLocation", "/checkpoints/events/bronze")
.outputMode("append")
.table("prod.bronze.raw_events")
)Delta Live Tables (DLT) extends this further by letting you declare transformation pipelines as Python or SQL with automatic dependency resolution, quality constraints, and managed checkpointing. It is the recommended way to build production streaming pipelines on Databricks today.
Compute: Clusters and SQL Warehouses
Databricks has two main compute types: clusters (for notebooks, jobs, and Spark workloads) and SQL Warehouses (optimized for BI queries and dbt).
Clusters are for PySpark, ML training, and complex ETL. Use job clusters (ephemeral, created per job run) rather than interactive clusters whenever possible. Interactive clusters left running are a common source of runaway cost.
SQL Warehouses run on Photon, Databricks' vectorized query engine, and are optimized for SQL queries. They support concurrency better than clusters and are the right compute type for dbt, BI tool connections, and ad hoc analysis.
Cost control tip: set aggressive auto-termination on all clusters (15-30 minutes of inactivity). Use spot instances for job clusters. Size clusters based on actual data volume, not aspirational future scale.
dbt + Databricks
dbt works well with Databricks via the dbt-databricks adapter. Models run as SQL on a SQL Warehouse, with incremental models using Delta Lake's merge capability.
# profiles.yml
my_project:
target: prod
outputs:
prod:
type: databricks
host: your-workspace.azuredatabricks.net
http_path: /sql/1.0/warehouses/abc123
catalog: prod # Unity Catalog
schema: gold
token: "{{ env_var('DBT_ACCESS_TOKEN') }}"
# models/gold/daily_revenue.sql
{{ config(
materialized='incremental',
unique_key='date_day',
incremental_strategy='merge'
) }}
SELECT
date_trunc('day', event_ts) AS date_day,
sum(revenue_usd) AS total_revenue
FROM {{ ref('silver_transactions') }}
{% if is_incremental() %}
WHERE event_ts >= (SELECT max(date_day) FROM {{ this }})
{% endif %}
GROUP BY 1When Databricks Is the Right Choice
Databricks is well-suited when you have one or more of:
- Large-scale ML workloads: Training models on hundreds of gigabytes to terabytes of feature data, distributed training with GPUs.
- Complex ETL on raw data: Unstructured data, JSON with variable schemas, multi-step transformations that benefit from Spark's parallelism.
- Streaming pipelines: High-volume event processing where micro-batch or real-time processing is required.
- Existing Spark investment: Teams already running Spark who want managed infrastructure and better collaboration tooling.
- Unified platform goal: Organizations that want a single platform for data engineering, analytics engineering, and ML.
When Databricks Is Not the Right Choice
Do not reach for Databricks when:
- Your data fits in memory or on a single node. DuckDB or Pandas will be faster and dramatically cheaper.
- Your team primarily needs SQL analytics and BI. Snowflake and BigQuery have better concurrency, more mature semantic layers, and simpler cost models for query-heavy workloads.
- You want fast iteration on transformations. Notebook-based development has its place, but dbt with a warehouse is faster to test, version, and debug.
- Your team is small and does not have Spark expertise. Managed Spark has operational overhead. The abstractions leak. Plan for that learning curve.
Practical Interview Angle
When Databricks comes up in a senior DE interview, the signal the interviewer is looking for is whether you know the tradeoffs, not just the feature list. The strong answer combines specific capabilities (Delta Lake ACID, Unity Catalog lineage, Auto Loader for streaming ingest) with honest assessment of when a warehouse would be better.
A common system design question is: “How would you build a real-time analytics platform for event data at 10M events per day?” A Databricks-based answer that scores well: ingest via Kafka into Auto Loader, transform with DLT or Structured Streaming into Delta Lake bronze/silver/gold, serve gold layer via SQL Warehouse to BI tools, use Unity Catalog for access control and lineage. Then explain what would make you choose Databricks over Snowflake Dynamic Tables or BigQuery for this use case.
Key Takeaways
- Databricks is a managed Spark platform, not a data warehouse replacement
- Delta Lake adds ACID transactions, schema enforcement, and time travel to cloud storage
- Unity Catalog provides three-level namespacing, column-level security, and lineage
- Use SQL Warehouses for dbt and BI, job clusters for ETL and ML
- Auto Loader is the recommended pattern for incremental cloud storage ingest
- Cost control requires aggressive auto-termination and right-sized clusters
- Databricks wins for ML, large-scale ETL, and streaming; warehouses win for analytics