Quick-reference for deciding how fresh a Databricks pipeline needs to be, what that costs, and when to keep the workload out of the lakehouse entirely.
| Tier | Latency | Build with | Compute profile | Use when |
|---|---|---|---|---|
| Incremental / triggered | Minutes | Serverless job + Trigger.AvailableNow(), or triggered Lakeflow pipeline |
Starts in seconds, runs backlog, exits | Medallion ETL, scheduled forecasts, market-deadline outputs |
| Continuous | Seconds | Lakeflow pipeline in continuous mode | Always-running cluster | Live monitoring, imbalance views, sub-minute freshness |
| Real-time mode | ~300 ms typical, <1 s tail, 5 ms floor | .trigger(realTime='5 minutes') |
Dedicated compute, all stages scheduled at once | Fraud detection, operational alerting, immediate automated action |
Sources: Real-time mode concepts, Triggered vs. continuous pipeline mode, Streaming on serverless compute.
Docs place triggered mode at "every 10 minutes, hourly, or daily" and continuous at "every 10 seconds and a few minutes". A 5-minute cadence sits on the boundary — decide by benchmarking cost per day on your real volume, not by reading the doc harder.
# Triggered / incremental — cheapest, minute-level freshness
(df.writeStream
.trigger(availableNow=True)
.option("checkpointLocation", checkpoint_path)
.toTable("catalog.schema.target"))
# Time-based micro-batch — classic compute only, NOT serverless
.trigger(processingTime="5 minutes")
# Real-time mode — sub-second, dedicated compute
.trigger(realTime="5 minutes") # arg = batch length, not latency
# Deprecated since DBR 11.3 — migrate to availableNow
.trigger(once=True)
⚠ Serverless trigger constraints
Trigger.AvailableNow() (recommended), Trigger.Once() (deprecated).Trigger.ProcessingTime(interval), Trigger.Continuous(interval).INFINITE_STREAMING_TRIGGER_NOT_SUPPORTED (Spark defaults to ProcessingTime("0 seconds")).| Rule | Why |
|---|---|
| Never use all-purpose compute for streaming | Use jobs compute; new resources deploy on retry |
| Never enable classic autoscaling on a streaming job | Scale-down is unreliable; use Lakeflow enhanced autoscaling |
| One checkpoint directory per query, in cloud storage | Checkpoint reuse corrupts progress tracking |
| Prefer Lakeflow pipelines over hand-rolled streaming | Databricks' explicit recommendation for new pipelines |
Make foreachBatch logic idempotent | foreachBatch is at-least-once, not exactly-once |
| Never leave the trigger unset | Default is 0 ms polling → runaway cloud storage API charges |
Don't call awaitTermination() in a job | Blocks the Jobs service from tracking the query |
| Configure jobs to auto-restart on failure | Continuous job trigger retries with exponential backoff |
Source: Production considerations for Structured Streaming.
update instead of append where supported; never complete. Requires an idempotent sink.AvailableNow/Once).Keep it out of the lakehouse if…
| Signal | Typical cadence | Lane |
|---|---|---|
| NWP run (ICON, ECMWF, GFS) | 1–6 hours | Slow |
| SCADA telemetry | 1–10 minutes | Fast |
| Meter / settlement data | 15 min – daily | Slow |
| Intraday market prices | Continuous, gate-driven | Fast |
| Model retraining | Daily – weekly | Slow |
Rule: the fast lane recomputes only what fresh telemetry can change — measured output, availability, curtailment state, and a short-horizon bias/persistence correction. Everything else rides the slow lane.
Rechtliches: Impressum