Skip to content
Skills Library
Data & analytics · Analysis

spark-sql-plan-analyzer

/spark-sql-plan-analyzer

Use whenever the Databricks MCP server is called to analyze Spark application performance, the slowest SQL query, its final plan, stages, tasks or node metrics. Detects broadcast, skew, coalesce, spill, full-scan, join-explosion, shuffle, small-file, UDF and straggler issues.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

85/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use whenever the Databricks MCP server is called to analyze Spark application performance, the slowest SQL query, its final plan, stages, tasks or node metrics. Detects broadcast, skew, coalesce, spill, full-scan, join-explosion, shuffle, small-file, UDF and straggler issues.

Original author description

Use whenever the Databricks MCP server is called to analyze Spark application performance, the slowest SQL query, its final plan, stages, tasks or node metrics. Detects broadcast, skew, coalesce, spill, full-scan, join-explosion, shuffle, small-file, UDF and straggler issues.

How it works

  1. Workflow
  2. Constraints
  3. Output (per issue)
Original SKILL.md headings · 27 lines, 200 words
SKILL.md preview
---
name: spark-sql-plan-analyzer
description: Use whenever the Databricks MCP server is called to analyze Spark application performance, the slowest SQL query, its final plan, stages, tasks or node metrics. Detects broadcast, skew, coalesce, spill, full-scan, join-explosion, shuffle, small-file, UDF and straggler issues.
---

# Spark SQL Plan Analyzer

Inspect the final plan of the slowest SQL operation of a Spark application and report only real, evidenced issues.

## Workflow
1. Using the Databricks MCP tools, fetch only the slowest running SQL execution for the application, then its final plan, node metrics and stage/task metrics.
2. Start with a concise checklist (3-7 conceptual bullets) of the analysis steps.
3. Evaluate every pattern in `patterns.md` against the plan.
4. Validate each finding: does the evidence meet the pattern threshold? If not, drop it or self-correct.
5. Report only patterns where an issue exists. Omit all others.
6. After the baseline patterns, you may add "Additional observations" supported by plan evidence. Keep them separate and clearly labeled.

## Constraints
- Advisory partition size = 128 MB (`spark.sql.adaptive.advisoryPartitionSizeInBytes`).
- Always cite stageId and taskId; if unavailable, use nodeId.
- Never guess missing metrics. State "not available" instead.
- Pattern 1 applies to non-broadcast joins; Pattern 6 applies to broadcast joins.
- Read-only analysis: do not modify tables, configs or jobs.

## Output (per issue)
- Pattern name and severity
- Stage ID / Task ID (or Node ID)
- Evidence (concrete numbers)
- Likely cause
- Recommendation
Files in this package (2)
  • SKILL.md 2 KB
  • patterns.md 5 KB

Versions

The database has no other skills named spark-sql-plan-analyzer.

Database snapshot: 13.11.2026 · package version 4d518167a450 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100aidp-spark-debugging
    Diagnose slow or failed AIDP Spark work using cluster logs, metrics, and the Spark UI REST API. Use when a job/query is slow or failed, the user asks "why did this fail / why is it slow", or you need stage/task timings, skew, shuffle/spill, executor, or SQL-execution details.…
  • 100aidp-spark-debugging
    Diagnose slow or failed AIDP Spark work using cluster logs, metrics, and the Spark UI REST API. Use when a job/query is slow or failed, the user asks "why did this fail / why is it slow", or you need stage/task timings, skew, shuffle/spill, executor, or SQL-execution details.…
  • 100optimizing-pyspark-jobs
    Optimize slow or failing PySpark and Spark SQL jobs — partitioning and repartitioning, data skew, shuffles, broadcast joins, caching, Adaptive Query Execution, and avoiding driver collects and Python UDFs. Use when a Spark job is slow, spills, OOMs, has skewed tasks, runs a huge…
  • 100spark-sql-catalyst-optimizer-tuning
    Use this skill when tuning Spark SQL query performance, broadcast joins, adaptive query execution (AQE), and shuffle partitions.
  • 100spark-jobs
    Writes and tunes PySpark jobs - join strategy and broadcast size limits, shuffle-partition sizing, skew diagnosis and salting, UDF avoidance, caching, and output file layout - with concrete size and skew thresholds. Use when someone asks "why is my Spark job slow", "should I…
  • 100spark
    Apache Spark skill for ETL and data transformation across all versions (3.5 LTS through 4.2). Deep expertise in DataFrame API, Spark SQL, Catalyst optimizer, Structured Streaming, partition tuning, join strategies, and lakehouse integration. WHEN: \"Spark\", \"PySpark\",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.