Token导航 LogoToken导航

Agent Skill · 研究检索

databricks-spark-declarative-pipelines(databricks 激发声明式管道)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

databricks-spark-declarative-pipelines 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 61,288。

总安装 353周安装 15GitHub Stars 1,296下载 124核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:databricks-spark-declarative-pipelines(databricks 激发声明式管道)
来源仓库:https://github.com/databricks-solutions/ai-dev-kit
仓库路径:skills/databricks-spark-declarative-pipelines
安装命令:
npx skills add https://github.com/databricks-solutions/ai-dev-kit --skill databricks-spark-declarative-pipelines
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/databricks-solutions/ai-dev-kit --skill databricks-spark-declarative-pipelines

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

基于 Lakeflow 构建声明式数据管道,支持流式与批处理混合场景。强制使用 CREATE OR REFRESH 语法,避免标准 SQL 替换操作。适用于简化管道定义、提升可观测性与降低运维复杂度。需明确 catalog.schema.table 全限定名,并优先保证逻辑简洁性。

databricks-spark-declarative-pipelines 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/databricks-spark-declarative-pipelines

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/databricks-solutions/ai-dev-kit --skill databr…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

databricks-spark-declarative-pipelines 怎么安装?

在终端执行 npx skills add https://github.com/databricks-solutions/ai-dev-kit --skill databricks-spark…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

databricks-spark-declarative-pipelines 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

databricks-spark-declarative-pipelines 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

databricks-spark-declarative-pipelines 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

databricks-spark-declarative-pipelines 用的人多吗?

公开数据是累计安装 353 次,近一周安装 15 次,下载 124 次,GitHub 1,296 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

databricks-spark-declarative-pipelines 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 1,296 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
databricks-spark-declarative-pipelines

databricks 激发声明式管道 · 本页

3531,296调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Lakeflow Spark Declarative Pipelines (SDP)


Critical Rules (always follow)

Syntax: CREATE OR REFRESH (not CREATE OR REPLACE)

  • MUST use CREATE OR REFRESH for SDP objects:

- CREATE OR REFRESH STREAMING TABLE - for streaming tables - CREATE OR REFRESH MATERIALIZED VIEW - for materialized views

  • NEVER use CREATE OR REPLACE - that is standard SQL syntax, not SDP syntax

Simplicity First

  • MUST create the minimal number of tables to solve the task
  • Simplicity first: prefer single pipeline even for multi-schema setups - use fully qualified names (catalog.schema.table)
  • When asked to "create a silver table" or "create a gold table", create ONE table - not a multi-layer pipeline
  • Don't add intermediate tables, staging tables, or helper views unless explicitly requested
  • A silver transformation = 1 streaming table reading from bronze
  • A gold aggregation = 1 materialized view reading from silver
  • Create bronze→silver→gold chains when the user asks for a "pipeline" or "medallion architecture" or full/detailed ingestion. Otherwise keep it simple - don't over engineer.

Language Selection

  • MUST know the language (Python or SQL). For simple task / pipeline / table creation, pick SQL. For complex pipeline with parametrized information, or if the user mentions python-related items pick python. If you have a doubt, ask the user. Stick with that language unless told otherwise.
User SaysAction
"Python pipeline", "Python SDP", "use Python", "udf", "pandas", "ml inference", "pyspark"User wants Python
"SQL pipeline", "SQL files", "use SQL"User wants SQL
"Create a simple pipeline", "create a table", "an aggregation"Pick SQL as it's simple

Other Rules

  • MUST create serverless pipelines by default. Only use classic clusters if user explicitly requires R language, Spark RDD APIs, or JAR libraries.
  • MUST choose the right workflow based on context (see below).
  • When the user provides table schema and asks for code, respond directly with the code. Don't ask clarifying questions if the request is clear.

Tools

  • List files in volume: databricks fs ls dbfs:/Volumes/{catalog}/{schema}/{volume}/{path} --profile {PROFILE}
  • Query data: databricks experimental aitools tools query --profile {PROFILE} --warehouse abc123 "SELECT 1 FROM catalog.schema.table"
  • Discover schema: databricks experimental aitools tools discover-schema --profile {PROFILE} catalog.schema.table1 catalog.schema.table2
  • Pipelines CLI: databricks pipelines init|deploy|run|logs|stop or use databricks pipelines --help for more options

Choose Your Workflow

First, determine which workflow to use:

Option A: Standalone New Pipeline Project (use databricks pipelines init)

Use this when the user wants to create a new, standalone SDP project that will have its own DAB:

  • User asks: "Create a new pipeline", "Build me an SDP", "Set up a new data pipeline"
  • No existing databricks.yml in the workspace
  • The pipeline IS the project (not part of a larger demo/app)

Use databricks pipeline CLI commands:

databricks pipelines init --output-dir . --config-file init-config.json

Example init-config.json:

{
  "project_name": "customer_pipeline",
  "initial_catalog": "prod_catalog",
  "use_personal_schema": "no",
  "initial_language": "sql"
}

→ See 1-project-initialization.md →

Option B: Pipeline within Existing Bundle (edit the bundle)

Use this when the pipeline is part of an existing DAB project:

  • There's already a databricks.yml file in the project
  • User is adding a pipeline to an existing app/demo

→ See 1-project-initialization.md for adding pipelines to existing bundles

Option C: Rapid Iteration with MCP Tools (no bundle management)

Use this when you need to quickly create, test, and iterate on a pipeline without managing bundle files:

  • User wants to "just run a pipeline and see if it works"
  • Part of a larger demo where bundle is managed separately, or the DAB bundle will be created at the end as you want to quickly test the project first
  • Prototyping or experimenting with pipeline logic
  • User explicitly asks to use MCP tools

→ See 2-mcp-approach.md for MCP-based workflow


Required Checklist

Before writing pipeline code, make sure you have:

- [ ] Language selected: Python or SQL
- [ ] Read the syntax basics: **SQL**: Always Read [sql/1-syntax-basics.md](references/sql/1-syntax-basics.md), **Python**: Always Read [python/1-syntax-basics.md](references/python/1-syntax-basics.md)
- [ ] Workflow chosen: Standalone DAB / Existing DAB / MCP iteration
- [ ] Compute type: serverless (default) or classic
- [ ] Schema strategy: single schema with prefixes vs. multi-schema
- [ ] Consider [Multi-Schema Patterns](#multi-schema-patterns) and [Modern Defaults](#modern-defaults)

Then read additional guides based on what the pipeline needs, when you need it:

If the pipeline needs...Read
File ingestion (Auto Loader, JSON, CSV, Parquet)references/sql/2-ingestion.md or references/python/2-ingestion.md
Kafka, Event Hub, or Kinesis streamingreferences/sql/2-ingestion.md or references/python/2-ingestion.md
Deduplication, windowed aggregations, joinsreferences/sql/3-streaming-patterns.md or references/python/3-streaming-patterns.md
CDC, SCD Type 1/2, or history trackingreferences/sql/4-cdc-patterns.md or references/python/4-cdc-patterns.md
Performance tuning, Liquid Clusteringreferences/sql/5-performance.md or references/python/5-performance.md

Quick Reference

ConceptDetails
NamesSDP = Spark Declarative Pipelines = LDP = Lakeflow Declarative Pipelines (all interchangeable)
SQL SyntaxCREATE OR REFRESH STREAMING TABLE, CREATE OR REFRESH MATERIALIZED VIEW
Python Importfrom pyspark import pipelines as dp
Primary Decorators@dp.table(), @dp.materialized_view(), @dp.temporary_view()

Legacy APIs (Do NOT Use)

LegacyModern Replacement
import dltfrom pyspark import pipelines as dp
dlt.apply_changes()dp.create_auto_cdc_flow()
dlt.read() / dlt.read_stream()spark.read / spark.readStream
CREATE LIVE XXX`CREATE OR REFRESH STREAMING TABLE\MATERIALIZED VIEW`
PARTITION BY + ZORDERCLUSTER BY (Liquid Clustering)
input_file_name()_metadata.file_path
target parameterschema parameter

Streaming Table vs Materialized View

Use CaseTypePattern
Windowed aggregations (tumbling, sliding, session)Streaming TableFROM stream(source) + GROUP BY window()
Full-table aggregations (totals, daily counts)Materialized ViewFROM source (no stream wrapper)
CDC / SCD Type 2Streaming TableAUTO CDC INTO or dp.create_auto_cdc_flow()

Use streaming tables for windowed aggregations to enable incremental processing. Use materialized views for simple aggregations that recompute fully on each refresh.


Task-Based Routing

After choosing your workflow (see Choose Your Workflow), determine the specific task:

Choose documentation by language:

SQL Documentation

TaskGuide
SQL syntax basicssql/1-syntax-basics.md
Data ingestion (Auto Loader, Kafka)sql/2-ingestion.md
Streaming patterns (deduplication, windows)sql/3-streaming-patterns.md
CDC patterns (AUTO CDC, SCD, queries)sql/4-cdc-patterns.md
Performance tuningsql/5-performance.md

Python Documentation

TaskGuide
Python syntax basicspython/1-syntax-basics.md
Data ingestion (Auto Loader, Kafka)python/2-ingestion.md
Streaming patterns (deduplication, windows)python/3-streaming-patterns.md
CDC patterns (AUTO CDC, SCD, queries)python/4-cdc-patterns.md
Performance tuningpython/5-performance.md

General Documentation

TaskGuide
Setting up standalone pipeline project1-project-initialization.md
Rapid iteration with MCP tools2-mcp-approach.md
Advanced configuration3-advanced-configuration.md
Migrating from DLT4-dlt-migration.md

Official Documentation

Medallion Architecture

LayerSDP PatternCommon Practices
BronzeSTREAM read_files() → streaming tableOften adds _metadata.file_path, _ingested_at. Minimal transforms, append-only.
Silverstream(bronze) → streaming tableClean/validate, type casting, quality filters. Prefer DECIMAL(p,s) for money. Dedup can happen here or gold.
GoldAUTO CDC INTO or materialized viewAggregated, denormalized. SCD/dedup often via AUTO CDC. Star schema typically uses dim_*/fact_*.
Gold Layer: Preserve Key Dimensions

When aggregating data in gold tables, keep the main business dimensions to enable flexible analysis. Over-aggregating loses information that analysts may need later.

Guidance based on context:

  • If a dashboard is mentioned: Include all dimensions that appear as filters. Dashboard filters only work if the underlying data has those columns.
  • If analysis by dimension is mentioned (e.g., "analyze by store", "breakdown by department"): Include those dimensions in the aggregation.
  • If no specific instructions: Default to keeping key business dimensions (location, department, product line, customer segment, time period) rather than aggregating them away. This preserves flexibility for future analysis.

Rule of thumb: If users might want to slice the data by a dimension, include it in the gold table. It's easier to aggregate further in queries than to recover lost dimensions.

For medallion architecture (bronze/silver/gold), two approaches work:

  • Flat with naming (template default): bronze_*.sql, silver_*.sql, gold_*.sql
  • Subdirectories: bronze/orders.sql, silver/cleaned.sql, gold/summary.sql

Both work with the transformations/** glob pattern. Choose based on preference/existing.

See 1-project-initialization.md for complete details on bundle initialization, migration, and troubleshooting.


General SDP development guidance

SQL Example:

CREATE OR REFRESH STREAMING TABLE bronze_orders
CLUSTER BY (order_date)
AS SELECT *, current_timestamp() AS _ingested_at
FROM STREAM read_files('/Volumes/catalog/schema/raw/orders/', format => 'json');

Python Example:

from pyspark import pipelines as dp

@dp.table(name="bronze_events", cluster_by=["event_date"])
def bronze_events():
    return spark.readStream.format("cloudFiles").option("cloudFiles.format", "json").load("/Volumes/...")

For detailed syntax, see sql/1-syntax-basics.md or python/1-syntax-basics.md.

Best Practices (2026)

Project Structure

  • Standalone pipeline projects: Use databricks pipelines init for Asset Bundle with multi-environment support
  • Pipeline in existing bundle: Add to resources/*.pipeline.yml
  • Rapid iteration/prototyping: Use MCP tools, formalize in bundle later
  • See 1-project-initialization.md for project setup details

Minimal pipeline config pointers

  • Define parameters in your pipeline’s configuration and access them in code with spark.conf.get("key").
  • In Databricks Asset Bundles, set these under resources.pipelines..configuration; validate with databricks bundle validate.

Modern Defaults

  • Always use raw .sql/.py files for the transformations files - NO notebooks in your pipeline. Pipeline code must be plain files.
  • Databricks notebook source for explorations - Use # Databricks notebook source format with # COMMAND ---------- separators for ad-hoc queries. See examples/exploration_notebook.py.
  • Serverless compute - Do not use classic clusters unless explicitly required (R, RDD APIs, JAR libraries)
  • Unity Catalog (required for serverless)
  • CLUSTER BY (Liquid Clustering), not PARTITION BY with ZORDER - see sql/5-performance.md or python/5-performance.md
  • read_files() for SQL cloud storage ingestion - always consume a folder, not a single file - see sql/2-ingestion.md

Multi-Schema Patterns

Preferred: One pipeline writing to multiple schemas using fully qualified table names (catalog.schema.table). This keeps dependencies clear and is simpler to manage than multiple pipelines.

  • Python: @dp.table(name="catalog.bronze_schema.orders")
  • SQL: CREATE OR REFRESH STREAMING TABLE catalog.silver_schema.orders_clean AS...

For detailed examples, see 3-advanced-configuration.md.

Fallback: If all tables must be in the same schema, use name prefixes (bronze_*, silver_*, gold_*).


Post-Run Validation (Required)

After running a pipeline (via DAB or MCP), you MUST validate both the execution status AND the actual data.

Step 1: Check Pipeline Execution Status

From MCP (manage_pipeline(action="run") or manage_pipeline(action="create_or_update")):

  • Check result["success"] and result["state"]
  • If failed, check result["message"] and result["errors"] for details

From DAB (databricks bundle run):

  • Check the command output for success/failure
  • Use manage_pipeline(action="get", pipeline_id=...) to get detailed status and recent events

Step 2: Validate Output Data

Even if the pipeline reports SUCCESS, you MUST verify the data is correct:

# MCP Tool: get_table_stats_and_schema - validates schema, row counts, and stats
get_table_stats_and_schema(
    catalog="my_catalog",
    schema="my_schema",
    table_names=["bronze_*", "silver_*", "gold_*"]  # Use glob patterns
)

Check for:

  • Empty tables (row_count = 0) - indicates ingestion or filtering issues
  • Unexpected row counts - joins may have exploded or filtered too much
  • Missing columns - schema mismatch or transformation errors
  • NULL values in key columns - data quality issues

Step 3: Debug Data Issues

If validation reveals problems, trace upstream to find the root cause:

  1. Start from the problematic table - identify what's wrong (empty, wrong counts, bad data)
  2. Check its source table - use get_table_stats_and_schema on the upstream table
  3. Trace back to bronze - continue until you find where the issue originates
  4. Common causes:

- Bronze empty → source files missing or path incorrect - Silver empty → filter too aggressive or join condition wrong - Gold wrong counts → aggregation logic error or duplicate keys - Data mismatch → type casting issues or NULL handling

  1. Fix the SQL/Python code, re-upload, and re-run the pipeline

Do NOT use execute_sql with COUNT queries for validation - get_table_stats_and_schema is faster and returns more information in a single call.


Common Issues

IssueSolution
Empty output tablesUse get_table_stats_and_schema to check upstream sources. Verify source files exist and paths are correct.
Pipeline stuck INITIALIZINGNormal for serverless, wait a few minutes
"Column not found"Check schemaHints match actual data
Streaming reads failFor file ingestion in a streaming table, you must use the STREAM keyword with read_files: FROM STREAM read_files(...). For table streams use FROM stream(table). See read_files — Usage in streaming tables.
Timeout during runIncrease timeout, or use wait_for_completion=False and check status with manage_pipeline(action="get")
MV doesn't refreshEnable row tracking on source tables
SCD2: query column not foundLakeflow uses __START_AT and __END_AT (double underscore), not START_AT/END_AT. Use WHERE __END_AT IS NULL for current rows. See sql/4-cdc-patterns.md.
AUTO CDC parse error at APPLY/SEQUENCEPut APPLY AS DELETE WHEN before SEQUENCE BY. Only list columns in COLUMNS * EXCEPT (...) that exist in the source (omit _rescued_data unless bronze uses rescue data). Omit TRACK HISTORY ON * if it causes "end of input" errors; default is equivalent. See sql/4-cdc-patterns.md.
"Cannot create streaming table from batch query"In a streaming table query, use FROM STREAM read_files(...) so read_files leverages Auto Loader; FROM read_files(...) alone is batch. See sql/2-ingestion.md and read_files — Usage in streaming tables.

For detailed errors, the result["message"] from manage_pipeline(action="create_or_update") includes suggested next steps. Use manage_pipeline(action="get", pipeline_id=...) which includes recent events and error details.


Advanced Pipeline Configuration

For advanced configuration options (development mode, continuous pipelines, custom clusters, notifications, Python dependencies, etc.), see 3-advanced-configuration.md.


Platform Constraints

Serverless Pipeline Requirements (Default)

RequirementDetails
Unity CatalogRequired - serverless pipelines always use UC
Workspace RegionMust be in serverless-enabled region
Serverless TermsMust accept serverless terms of use
CDC FeaturesRequires serverless (or Pro/Advanced with classic clusters)

Serverless Limitations (When Classic Clusters Required)

LimitationWorkaround
R languageNot supported - use classic clusters if required
Spark RDD APIsNot supported - use classic clusters if required
JAR librariesNot supported - use classic clusters if required
Maven coordinatesNot supported - use classic clusters if required
DBFS root accessLimited - must use Unity Catalog external locations
Global temp viewsNot supported

General Constraints

ConstraintDetails
Schema EvolutionStreaming tables require full refresh for incompatible changes
SQL LimitationsPIVOT clause unsupported
SinksPython only, streaming only, append flows only

Default to serverless unless user explicitly requires R, RDD APIs, or JAR libraries.

Related Skills

平台分布

Codex

34.21%
按下载量换算42

Claude

28.4%
按下载量换算35

Cursor

20.08%
按下载量换算25

Gemini CLI

9.46%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills