Databricks streaming reliability

From VincentChuWaiChow/vanguard-frontier-agentic · View interactive version

Databricks streaming reliability is an AI agent skill from the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic. Use this skill to verify Structured Streaming query correctness and recovery: state-schema immutability, checkpoint compatibility across restarts, watermark semantics, trigger selection (AvailableNow, Once, ProcessingTime), exactly-once vs at-least-once sinks, foreachBatch idempotency, RocksDB and c

How to use this skill

Skill file

databricks-streaming-reliability

Purpose

This skill decides whether a Structured Streaming query is safe and recoverable. A query is correct only when state schema is immutable across restarts, checkpoint is private to one query, watermarks are declared before stateful operations, triggers align to the workload (AvailableNow for incremental batches, ProcessingTime for real-time), sinks provide the required durability semantics, foreachBatch includes idempotency logic, state capacity is sized correctly, and restart/backfill plans are explicit and safe.

When to use

When NOT to use

Scope

Decision workflow

  1. Establish the query source (Structured Streaming API or Auto Loader source), state schema, and checkpoint location — refuse if missing.
  2. Check for state-schema changes between restarts: flag additions, deletions, or type changes to state-keying columns as breaking.
  3. Verify checkpoint isolation: confirm the checkpoint location is unique to this query and not shared with other queries.
  4. Review watermark declaration: confirm watermarks are declared before stateful operations (groupBy, join, etc.); assess threshold sizing and multipleWatermarkPolicy choice.
  5. Validate trigger choice: flag deprecated Trigger.Once (use AvailableNow instead); confirm ProcessingTime or Continuous is chosen intentionally; for serverless, require AvailableNow/Once and maxFilesPerTrigger/maxBytesPerTrigger.
  6. Assess sink semantics: determine whether exactly-once is required; if so, verify foreachBatch includes idempotency logic and batchId deduplication; for Delta writes, confirm txnVersion is bound to batchId.
  7. Evaluate state-store configuration: for large stateful workloads, confirm RocksDB is enabled; verify changelog checkpointing is enabled (or explicitly disabled with justification on DBR 17.3+).
  8. For backfill scenarios: confirm checkpoint isolation from incremental runs; verify state-schema is immutable across both phases; confirm partial-backfill plan is safe.

Lean operating rules

Evidence requirements

No recommendation is issued before the evidence below exists. When it is missing, name the smallest artifact that would supply it and stop.

Context7 MCP policy

Context7 supplies current, version-specific library and SDK documentation. It does not establish Databricks service behaviour — Databricks' own documentation does. Use it exactly when:

If Context7 is not exposed in the session, say so and label every version-sensitive claim unknown rather than answering from memory. Never state that Context7 was consulted when it was not, and never assume an MCP server or tool name.

Official documentation policy

Databricks service semantics come from current Databricks documentation, not from memory, blog posts, conference talks, or release-note summaries. Where the behaviour differs by cloud (AWS / Azure / GCP), name the cloud the claim applies to. Where a feature is Public Preview or Beta, say so on first mention and never describe it as a production default. Anything that cannot be grounded stays out of the answer and is reported as an open question.

Security boundaries

Runtime authority

T0 (static review only). Reads query source, state-schema definitions, and checkpoint configuration; never executes queries, never accesses checkpoint state, never modifies queries, and never accesses customer data. Review findings are recommendations only and require explicit human judgment before any production change.

Authority tiers used across this board: T0 static review (read artifacts only); T1 read-only runtime (allowlisted read-only queries against a workspace, no writes); T2 sandbox-mutating (dry-run or non-production only); T3 mutating-runtime (changes production state — human-approved live guards only). This skill never raises its own tier, and never hands a task to a higher tier without an explicit named human owner.

Production caveats

References

Progressive disclosure — load only the one the task needs:

Response minimum

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.