What problem does it solve?
This Skill helps you build custom Apache Spark data sources in Python so Spark can reliably read from and write to external systems when no native connector exists.
Core Features & Use Cases
- Batch + Streaming DataSource API: Implement readers/writers for both batch and Structured Streaming by following the required PySpark DataSource interfaces.
- Production-ready connector patterns: Cover partitioning strategies, option handling, authentication fallbacks, type conversion, offset management, retries/backoff, and error resilience.
- Executor-safe implementation guidance: Ensure third-party imports occur on executors and keep inheritance flat to avoid serialization issues.
Use Case Example: You need to load event data from a REST API into Spark continuously; implement a streaming reader that paginates, converts external types to Spark schema, manages offsets for incremental reads, and applies resilient error handling.
Quick Start
Ask: “Using the spark-python-data-source skill, design a PySpark DataSourceReader and DataSourceWriter for a REST API that supports both batch and streaming, including partitioning, OAuth2 authentication, type conversion, and exactly-once-style streaming offset handling.”