databricks-spark-structured-streaming

Build Spark Structured Streaming pipelines with Kafka and Delta Lake patterns.

27|9|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/datasciencemonkey/coding-agents-databricks-apps --skill databricks-spark-structured-streaming
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-spark-structured-streaming
Source: https://github.com/datasciencemonkey/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-spark-structured-streaming
Command: npx skills add https://github.com/datasciencemonkey/coding-agents-databricks-apps --skill databricks-spark-structured-streaming

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spark Structured Streaming in production can be complex and brittle, making it hard to guarantee reliability and performance. This guide provides a structured approach to building robust streaming pipelines, applying stateful processing, and optimizing throughput, latency, and fault tolerance.

Core Features & Use Cases

  • Patterns for Kafka ingestion, stream-to-Delta writes, stream-stream joins, and windowed analytics.
  • Production best practices covering watermarking, state store tuning, triggers, and monitoring for real-world workloads.
  • Real-world use cases including real-time dashboards, event-driven ETL, and streaming analytics at scale.

Quick Start

Create a minimal Spark Structured Streaming job that reads from Kafka, applies a watermark, and writes to Delta.

Frequently Asked Questions about databricks-spark-structured-streaming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a robust Spark Structured Streaming pipeline in production?

To build a robust Spark Structured Streaming pipeline in production, apply structured patterns for Kafka ingestion, stateful processing, and stream-to-Delta writes while tuning watermarks, triggers, and monitoring for fault tolerance.

How does watermarking work in Spark Structured Streaming?

Watermarking in Spark Structured Streaming defines the maximum acceptable delay for late data, allowing the engine to discard old state and prevent unbounded state growth, which is critical for maintaining production performance and reliability.

What is the best way to write Spark Structured Streaming data to Delta Lake?

The best way to write Spark Structured Streaming data to Delta Lake is to use stream-to-Delta writes, enabling ACID transactions, schema enforcement, and efficient upserts or merges for real-time analytics and event-driven ETL workloads.

Can I perform stream-stream joins with Spark Structured Streaming?

Yes, you can perform stream-stream joins with Spark Structured Streaming to merge real-time event streams, applying watermarks on both sides to bound state size and ensure accurate windowed analytics without unbounded memory consumption.

How do I tune state stores for stateful stream processing in Spark?

Tuning state stores for stateful stream processing in Spark requires configuring state store operators, optimizing memory allocation, and applying appropriate triggers to balance throughput and latency for real-world streaming analytics workloads.

Why does my Spark Structured Streaming job drop late events?

Spark Structured Streaming jobs drop late events when data arrives after the defined watermark threshold, a production mechanism used to bound state size and guarantee processing reliability rather than waiting indefinitely for delayed records.