What problem does it solve?
Connecting Apache Spark to external systems often requires custom, production-ready connectors that handle batch and streaming reads/writes, executor-safe execution, partitioning, authentication, type mapping, and robust error handling; this Skill codifies patterns and templates to build those connectors reliably in Python.
Core Features & Use Cases
- End-to-end connector patterns: Templates and class patterns for DataSource, reader/writer, batch and stream modes.
- Execution safety: Guidance on executor-local imports, flat single-level inheritance for serializability, and resource cleanup.
- Operational concerns: Partitioning strategies, authentication fallback chains, type conversion, streaming offsets, retries, circuit breakers, and dead-letter queues.
- Testing & production: Unit/integration testing patterns, observability and metrics, configuration validation, and deployment hardening.
- Use Case: Implement a Python Spark DataSource to read paginated REST API data in parallel, convert types, and write to an external system with OAuth2 and retry/backoff.
Quick Start
Create a Python DataSource for Spark that reads from a paginated REST API with time-based partitions, uses a fallback authentication chain, and writes results into a Spark DataFrame.