databricks-spark-declarative-pipelines

Build and deploy Spark Declarative Pipelines on Databricks using SQL or Python.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-spark-declarative-pipelines-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-spark-declarative-pipelines
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-spark-declarative-pipelines
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-spark-declarative-pipelines-aarushishah

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building Lakeflow Spark Declarative Pipelines on Databricks requires knowing many syntax rules, API versions, and configuration options, and mistakes in ingestion, streaming, SCD, or pipeline settings cause failed runs that are hard to debug. ## Core Features & Use Cases - Ingestion & Streaming Patterns: Provides ready-to-use SQL and Python patterns for Auto Loader, Kafka, Event Hub, and Kinesis ingestion, plus deduplication, windowed aggregations, and late-arriving data handling. - SCD Type 2 & Performance Tuning: Covers AUTO CDC flows, point-in-time queries on history tables, Liquid Clustering, materialized view refresh, and state management. - End-to-End Pipeline Lifecycle: Scaffolds projects with databricks pipelines init, deploys via Asset Bundles, and creates, runs, and debugs pipelines through MCP tools like create_or_update_pipeline. - Use Case: A data engineer asks the agent to create a bronze-silver-gold pipeline ingesting JSON orders from cloud storage; the Skill generates the SQL files, uploads them, creates the serverless pipeline, runs it, and iterates on errors until it succeeds. ## Quick Start Create a Spark Declarative Pipeline that ingests JSON order files from cloud storage into bronze, silver, and gold tables and run it on serverless compute.

Frequently Asked Questions about databricks-spark-declarative-pipelines

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

FAQPage Schema
How do I create a Spark Declarative Pipeline on Databricks?

Write SQL or Python transformation files locally, upload them to the workspace, then call the create_or_update_pipeline MCP tool with the pipeline name, catalog, schema, and file paths. It creates or updates the pipeline, starts a run, and returns success status with detailed errors for iteration.

Should I use SQL or Python for Databricks declarative pipelines?

Use SQL for transformations, aggregations, joins, and standard ingestion since it is simpler to develop. Use Python with the pyspark.pipelines API when you need UDFs, external API calls, ML inference, or complex custom logic that SQL cannot express.

What is the difference between pyspark.pipelines and the dlt API?

pyspark.pipelines (imported as dp) is the modern recommended API supporting Liquid Clustering and explicit Unity Catalog paths, while dlt is the legacy Delta Live Tables API. Both are supported, but new projects should use dp with create_auto_cdc_flow instead of dlt.apply_changes.

How do I handle malformed records in Auto Loader ingestion?

Use the _rescued_data column to flag records with parsing errors, then split the stream into a quarantine table for investigation and a clean table for downstream processing. Set mode to PERMISSIVE in read_files so schema changes do not break the pipeline.

When should I use Liquid Clustering instead of PARTITION BY?

Use Liquid Clustering with CLUSTER BY for nearly all new tables because it adapts to data distribution, avoids small files, and removes manual OPTIMIZE work. Keep PARTITION BY only for regulatory separation, partition-drop retention, or older Delta versions.

Why does my streaming table fail with a batch query error?

The error occurs when a streaming table query lacks the STREAM keyword, for example using read_files without STREAM or feeding AUTO CDC from a batch source. Rewrite the source as FROM STREAM read_files(...) so the flow is streaming.