Spark Declarative Pipelines (SDP) - Complete Reference
Description
A comprehensive guide for working with Spark 4.1+ Declarative Pipelines, from first principles to production deployment. ---
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Spark Declarative Pipelines (SDP) - Complete Reference
A comprehensive guide for working with Spark 4.1+ Declarative Pipelines, from first principles to production deployment.
Table of Contents
- What is SDP?
- Prerequisites
- Core Concepts
- Schema Discovery
- Your First Pipeline
- The SDP API
- Pipeline Configuration
- CLI Reference
- Patterns & Best Practices
- Streaming Pipelines
- Performance Tuning
- Testing Strategies
- Production Operations
- Migration from Imperative
- Troubleshooting
- When NOT to Use SDP
- Quick Reference
What is SDP?
The Problem SDP Solves
Traditional PySpark pipelines require you to:
- Manually manage execution order
- Explicitly write data to tables
- Handle dependencies yourself
- Coordinate between batch and streaming
# Traditional approach - lots of boilerplate
def bronze_orders(spark):
df = spark.read.parquet("/data/orders.parquet")
df.write.mode("overwrite").saveAsTable("bronze.orders")
def silver_orders(spark):
df = spark.table("bronze.orders") # Must run after bronze_orders!
df = df.filter(col("id").isNotNull())
df.write.mode("overwrite").saveAsTable("silver.orders")
# You manage execution order
bronze_orders(spark)
silver_orders(spark)
The SDP Solution
SDP lets you declare **what** you want, not **how** to do it:
# SDP approach - declare intent, framework handles execution
@dp.materialized_view(name="bronze.orders")
def bronze_orders():
return spark.read.parquet("/data/orders.parquet")
@dp.materialized_view(name="silver.orders")
def silver_orders():
return spark.table("iceberg.bronze.orders").filter(col("id").isNotNull())
# Framework figures out order and handles writes
Key Benefits
| Benefit | Description |
|---|---|
| Automatic dependency resolution | Framework detects dependencies from spark.table() calls |
| No explicit writes | Return DataFrames; framework handles persistence |
| Unified batch/streaming | Same patterns for both; switch with decorator change |
| Built-in validation | dry-run catches errors before execution |
| Incremental by default | Streaming tables maintain state automatically |
Mental Model
Think of SDP like SQL views with superpowers:
SQL View: CREATE VIEW silver.orders AS SELECT * FROM bronze.orders WHERE ...
SDP: @dp.materialized_view(name="silver.orders")
def silver_orders(): return spark.table("...").filter(...)
The decorator says "I want a table called X". The function body says "here's the data". The
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11