spark-engineer

Diagnose and resolve performance bottlenecks in Spark data pipelines.

10.9k|1.0k|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/Jeffallan/claude-skills --skill spark-engineer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-engineer
Source: https://github.com/Jeffallan/claude-skills/tree/main/skills/spark-engineer
Command: npx skills add https://github.com/Jeffallan/claude-skills --skill spark-engineer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables building Spark data pipelines with DataFrame API, SQL, and performance tuning.

Core Features & Use Cases

  • DataFrames & Spark SQL: Transformations and optimizations.
  • Partitioning & caching: Efficient memory use on large datasets.
  • Streaming: Structured streaming patterns.

Quick Start

Define a small Spark job with a DataFrame pipeline and a streaming sink.

Frequently Asked Questions about spark-engineer

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

FAQPage Schema
How do I optimize Spark data pipeline performance for large-scale ETL workflows?

Optimize Spark pipelines by using DataFrame API over RDDs, defining explicit schemas, partitioning data to 200-1000 partitions per executor core, caching strategically, employing broadcast joins for small tables under 200MB, and monitoring Spark UI metrics for shuffle, spill, and garbage collection to identify bottlenecks.

What's the best way to partition data in Spark for distributed processing?

Partition Spark data by targeting 200-1000 partitions per executor core to balance parallelism and overhead. Use custom partitioning or salting techniques to mitigate data skew, and leverage the DataFrame API for efficient repartitioning aligned with your ETL workflow requirements.

When should I use Spark SQL versus RDDs for data transformations?

Use Spark SQL and DataFrame API for most transformations because they enable Catalyst optimizer to improve performance automatically. Reserve RDDs only for unstructured data or low-level transformations where DataFrames cannot express your logic efficiently.

How do I handle data skew in Spark batch and streaming jobs?

Address data skew by salting keys to distribute uneven partitions, applying custom partitioning strategies, or using broadcast joins for dimension tables. Monitor Spark UI for unbalanced shuffle metrics and task durations to detect and resolve skew in production pipelines.

Can I use Spark SQL for both batch ETL and structured streaming workflows?

Yes, Spark SQL works for both batch ETL and structured streaming pipelines. Use consistent schema definitions and DataFrame transformations across both patterns to leverage the same optimization engine and simplify production-grade pipeline maintenance.

What caching strategy should I use to avoid memory spill in large Spark datasets?

Cache DataFrames judiciously by caching only reused intermediate results, monitor Spark UI for spill metrics, and size your executor memory and partitions to keep working sets in memory. Avoid caching very large datasets; instead, repartition and persist only critical transformation points.