spark-python-data-source

Develop custom Apache Spark data source connectors using the PySpark DataSource API.

3|Updated Jan 2, 2025
One-click install
npx skills add https://github.com/ScottHMcKean/genai_notebooks --skill spark-python-data-source-scotthmckean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-python-data-source
Source: https://github.com/ScottHMcKean/genai_notebooks/tree/main/.cursor/skills/spark-python-data-source
Command: npx skills add https://github.com/ScottHMcKean/genai_notebooks --skill spark-python-data-source-scotthmckean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyspark, pytest, pytest-spark, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables the creation of custom Apache Spark data source connectors for systems lacking native Spark support, streamlining data integration.

Core Features & Use Cases

  • Custom Connectors: Develop readers and writers for databases, APIs, message queues, and custom file formats.
  • Batch & Streaming: Implement support for both batch and real-time streaming data ingestion and egress.
  • Use Case: Connect Spark to a proprietary REST API that doesn't have a Spark connector, allowing you to read and write data as if it were a standard Spark table.

Quick Start

Use the spark-python-data-source skill to build a Spark connector for a custom REST API.

Frequently Asked Questions about spark-python-data-source

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

FAQPage Schema
How do I build a custom Spark data source connector in Python?

Build a custom Spark data source connector in Python by implementing the PySpark DataSource API to create batch and streaming readers and writers for external systems like databases, REST APIs, and message queues.

Can PySpark read and write to external systems without native Spark support?

Yes, PySpark can read and write to external systems without native Spark support by developing custom data source connectors that implement batch and streaming ingestion and egress for proprietary APIs and file formats.

What is the best way to connect Spark to a proprietary REST API?

The best way to connect Spark to a proprietary REST API is to build a custom data source connector using Python, allowing you to read and write data as if it were a standard Spark table.

Does the PySpark DataSource API support both batch and streaming data integration?

Yes, the PySpark DataSource API supports both batch and streaming data integration, enabling you to implement custom readers and writers for real-time message queues and standard batch database ingestion.

How do I test a custom PySpark data connector?

Test a custom PySpark data connector using pytest and pytest-spark to validate your batch and streaming reader and writer implementations against the PySpark DataSource API.

Do I need advanced Python knowledge to implement a custom Spark data source?

Implementing a custom Spark data source requires PySpark knowledge, but the approach focuses on simplicity, explicit control flow, and standard library usage to streamline custom connector development.