spark-python-data-source

Build Python-based PySpark DataSource connectors for batch and streaming readers and writers.

11|3|Updated Jun 10, 2025
One-click install
npx skills add https://github.com/Paldom/databricks-apps-fastapi-starter --skill spark-python-data-source-paldom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-python-data-source
Source: https://github.com/Paldom/databricks-apps-fastapi-starter/tree/main/.gemini/skills/spark-python-data-source
Command: npx skills add https://github.com/Paldom/databricks-apps-fastapi-starter --skill spark-python-data-source-paldom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PySpark users need custom Python data sources to read from and write to external systems using the PySpark DataSource API, including both batch and streaming modes, without reliance on Java/Scala code.

Core Features & Use Cases

  • Support a flat, transactionally-safe inheritance pattern for DataSource, DataSourceReader, DataSourceWriter, and streaming variants.
  • Provide ready-to-adapt templates to connect Spark with external systems (databases, REST APIs, message queues) in Python.
  • Use cases include building custom connectors, ingesting data into Spark from SaaS APIs, or exporting transformed results to destinations in batch or streaming contexts.

Quick Start

Set up a PySpark data source project skeleton and adapt the templates to implement a custom connector.

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 PySpark data source connector in Python?

To build a custom PySpark data source in Python, you implement a flat inheritance structure for DataSource, DataSourceReader, and DataSourceWriter using ready-to-adapt templates that bridge Spark with external systems.

Can I read streaming data into Spark from REST APIs without using Java or Scala?

Yes, you can read streaming data into Spark from REST APIs using Python-based PySpark DataSource connectors, which support both batch and streaming readers without relying on Java or Scala code.

Does PySpark DataSource API support writing to message queues in streaming workflows?

PySpark DataSource API supports writing to message queues in streaming workflows by providing transactionally-safe DataSourceWriter and streaming variant templates that export transformed results directly to external destinations.

What is the best way to ensure production-grade error handling in a Python PySpark data source?

The best way to ensure production-grade error handling in a PySpark data source is to enforce robust error handling, in-executor imports for compatibility, and minimal dependencies within your custom Python connector implementation.

Do I need Java or Scala dependencies to ingest SaaS API data into Spark?

No, you do not need Java or Scala dependencies to ingest SaaS API data into Spark, as the PySpark DataSource API allows developers to build custom Python connectors using a flat inheritance pattern with minimal external dependencies.

When should I use a flat inheritance structure for PySpark batch and streaming readers?

You should use a flat inheritance structure for PySpark batch and streaming readers when building transactionally-safe custom connectors that require in-executor imports and minimal dependencies for bridging Spark with external systems.