spark

Solid

Use when building distributed data pipelines with Apache Spark. Covers partitioning, shuffles, skew, joins, caching, and reading the Spark UI to find why a job is slow.

Data & Documents 23 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Spark ## Purpose Write Spark jobs whose cost is understood. Almost all Spark performance problems are one of three things: too much shuffle, skewed partitions, or reading far more data than the query needs. ## When to Use - Building or reviewing a Spark pipeline. - A job that is slow, failing with out-of-memory errors, or has one straggling task. - Tuning partitioning and join strategy. - Reading the Spark UI to diagnose a stage. ## Capabilities - Partitioning strategy and repartitioning. - Shuffle minimization and broadcast joins. - Skew detection and mitigation. - Caching and persistence levels. - File-format and predicate-pushdown optimization. - Spark UI interpretation. ## Inputs - The job, its input data volume, and its physical plan. - The Spark UI: stage timings, task distribution, shuffle read/write. - Cluster resources. ## Outputs - A plan with fewer or smaller shuffles. - Balanced partitions with no straggling tasks. - Measured improvement in wall-clock time and cost. ## Workflow 1. **Read the plan first** — `df.explain(True)`. Every `Exchange` is a shuffle, and a shuffle writes to disk and crosses the network. It is the dominant cost. 2. **Prune early** — Select the columns and filter the rows you need before joining, not after. With Parquet, this pushes down to the file reader and never reads the data at all. 3. **Broadcast the small side** — A join where one side fits in memory (roughly under 100 MB) should be a broadcast join. That eliminates the s...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
2 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

spark-guidelines

Use when designing, building, or reviewing Apache Spark 4 data pipelines — batch and streaming DataFrame transforms, lakehouse sinks (Delta/Iceberg), Spark Connect, Structured Streaming (watermarks, checkpoints, transformWithState, state data source), partitioning/AQE/shuffle optimization, and idempotent MERGE/CDC patterns. Reach for this whenever the user mentions Spark, PySpark, Structured Streaming, lakehouse ETL, or distributed dataframe pipelines even if they do not name Spark 4 explicitly.

1 Updated 3 days ago
stevencarpenter
Code & Development Listed

spark-pyspark-guidelines

Use when writing or reviewing idiomatic PySpark 4 code — typed DataFrames, pandas UDFs/Arrow, transformWithStateInPandas StatefulProcessor, StructType schemas, Pandas API on Spark, pytest fixtures, and Python packaging for Spark jobs. Trigger for PySpark, Python Spark ETL, Databricks notebooks in Python, or spark-submit Python pipelines even when "Spark" is not spelled out.

1 Updated 3 days ago
stevencarpenter
Data & Documents Listed

streaming-patterns

Kafka, Flink, Kinesis, and Spark Structured Streaming design — consumer groups, partitioning, exactly-once semantics, lag monitoring, windowing, and late-arriving data. Use this skill whenever the user needs real-time or near-real-time data processing, is redesigning a batch pipeline into streaming, asks about event-driven architectures, or mentions Kafka topics, consumer lag, checkpointing, watermarks, or stream-table joins. Also trigger when the user says batch is "too slow", stakeholders want "live" dashboards, or the pipeline needs to react to events as they happen rather than on a schedule. If latency requirements are under a few minutes, this skill should be active.

1 Updated 1 weeks ago
Methasit-Pun