spark-engineer

Optimize Apache Spark applications with PySpark or Scala code snippets.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Estom/aiflex --skill spark-engineer-estom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-engineer
Source: https://github.com/Estom/aiflex/tree/main/skills-repo/Jeffallan-skills/spark-engineer
Command: npx skills add https://github.com/Estom/aiflex --skill spark-engineer-estom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps engineers design, implement, and optimize Apache Spark applications to reduce job runtime, prevent memory and shuffle failures, and improve resource efficiency in distributed data processing environments.

Core Features & Use Cases

  • Implementation guidance for DataFrame API, Spark SQL, and RDD operations with production-grade patterns and explicit schema recommendations.
  • Performance tuning: partitioning and caching strategies, shuffle and memory tuning, join optimization, AQE configuration, and cluster sizing.
  • Streaming and reliability: structured streaming patterns, watermarking, state management, checkpointing, and best practices for stream-static and stream-stream joins.
  • Use Case: Optimize a daily ETL that processes terabytes of clickstream data to minimize shuffle, eliminate skew, and reduce end-to-end runtime while preserving correctness.

Quick Start

Analyze the provided Spark job and return an optimized PySpark implementation with explicit schema, partitioning strategy, configuration tuning, and monitoring recommendations.

Frequently Asked Questions about spark-engineer

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

FAQPage Schema
How do I optimize PySpark data pipelines to reduce shuffle and prevent memory failures?

Optimize PySpark data pipelines by applying explicit schema recommendations, partitioning and caching strategies, and memory tuning. This approach minimizes shuffle operations, eliminates data skew, and prevents memory failures to reduce overall job runtime.

What is the best way to configure Spark SQL Adaptive Query Execution for large ETL jobs?

The best way to configure Adaptive Query Execution is by applying AQE configuration recommendations alongside cluster sizing and join optimization. This dynamically coalesces shuffle partitions and switches join strategies to improve resource efficiency in large ETL jobs.

How does Structured Streaming handle watermarking and state management in Spark?

Structured Streaming handles watermarking and state management by applying specific streaming patterns and checkpointing best practices. This tracks event-time data, manages stateful computations, and ensures fault tolerance and data correctness in continuous stream processing.

Does this Spark optimization guidance support both PySpark and Scala implementations?

Yes, the Spark optimization guidance supports both PySpark and Scala implementations. It delivers production-grade code snippets and explicit schema recommendations for DataFrame API, Spark SQL, and RDD operations across both programming languages.

Why does my Spark job experience severe data skew during large joins?

Spark jobs experience severe data skew during large joins due to uneven partitioning and lack of join optimization. Resolve this by applying partitioning strategies, enabling Adaptive Query Execution, and implementing explicit schema recommendations to balance shuffle blocks.

Can I use Spark UI and AQE metrics to troubleshoot slow streaming pipelines?

Yes, you can use Spark UI and AQE metrics to troubleshoot slow streaming pipelines. The monitoring and troubleshooting guidance analyzes Spark UI metrics and AQE configurations to identify shuffle bottlenecks and optimize stateful streaming workloads.