spark-basics

Creates SparkSessions and performs PySpark ETL with CSV, Parquet, JSON, and Delta.

6|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/timequity/plugins --skill spark-basics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-basics
Source: https://github.com/timequity/plugins/tree/main/craft-coder/data/spark-basics
Command: npx skills add https://github.com/timequity/plugins --skill spark-basics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PySpark basics for distributed data processing, enabling scalable ETL.

Core Features & Use Cases

  • Creating SparkSession
  • Reading data in CSV, Parquet, JSON, Delta
  • Transformations: select, filter, aggregate
  • Writing data and optimization tips

Quick Start

Create a SparkSession and run a few simple reads and transforms on a sample dataset.

Frequently Asked Questions about spark-basics

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

FAQPage Schema
How do I process large datasets with PySpark for ETL workflows?

PySpark enables distributed ETL by creating a SparkSession, reading data from CSV, Parquet, JSON, or Delta Lake formats, applying transformations like select and filter across partitions, then writing results back. This scales data processing across clusters for analytics tasks.

What's the best way to read and transform data in multiple formats with Spark?

SparkSession handles diverse formats—CSV, Parquet, JSON, Delta—through unified read APIs. Chain transformations like select, filter, and aggregate on the resulting DataFrames, then write to Parquet or Delta Lake with optimization strategies like caching and predicate pushdown.

How do I optimize PySpark queries for large-scale data processing?

Optimization involves enabling adaptive execution in SparkSession, using caching for frequently accessed DataFrames, applying predicate pushdown to filter early, and leveraging partitioning and joins. These techniques reduce shuffles and memory usage across distributed executors.

Can I use PySpark for aggregations, joins, and windowing on large datasets?

Yes. PySpark supports aggregations, joins across DataFrames, and window functions for analytics. These operations work on partitioned data across clusters, making them suitable for large-scale transformations before writing to Parquet or Delta Lake.

What do I need to set up before starting distributed data processing with Spark?

Create a SparkSession as your entry point to the Spark cluster. Prepare data in supported formats like CSV, Parquet, JSON, or Delta Lake, and ensure your source (S3, local, or other storage) is accessible. Then read, transform, and write using DataFrame operations.