What problem does it solve?
Build custom Python data sources for Apache Spark using the PySpark DataSource API — batch and streaming readers/writers for external systems. Use this skill whenever someone wants to connect Spark to an external system (database, API, message queue, or custom protocol). It covers building a Spark connector or plugin in Python, implementing a DataSourceReader or DataSourceWriter, pulling data from or pushing data to a system via Spark, or working with the PySpark DataSource API in any way. If someone says "read from X in Spark" or "write DataFrame to Y" and there is no native connector, this skill applies.
Core Features & Use Cases
- Create custom Python data sources for Spark (batch and streaming) using the PySpark DataSource API.
- Implement readers/writers (DataSourceReader, DataSourceWriter, DataSourceStreamReader/Writer) with proper inheritance and option handling.
- Integrate Spark with external systems (databases, APIs, queues) to build end-to-end data pipelines and enable incremental processing.
Quick Start
Create a sample PySpark project, implement your custom DataSource following the provided template, and run a local Spark job to validate a batch read