spark-python-data-source

Connect Apache Spark to external systems using the PySpark DataSource API.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/Zack2626-ok/DATN_Website-Dat-Ban-Va-Quan-Ly-Nha-Hang --skill spark-python-data-source-zack2626-ok
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-python-data-source
Source: https://github.com/Zack2626-ok/DATN_Website-Dat-Ban-Va-Quan-Ly-Nha-Hang/tree/main/.windsurf/skills/spark-python-data-source
Command: npx skills add https://github.com/Zack2626-ok/DATN_Website-Dat-Ban-Va-Quan-Ly-Nha-Hang --skill spark-python-data-source-zack2626-ok

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyspark, pandas, numpy, requests, boto3, spark-sql, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the challenge of connecting Apache Spark to external systems like databases, APIs, and message queues. It enables users to build custom data sources, implement Spark connectors or plugins in Python, and perform complex data operations like reading from and writing to external systems.

Core Features & Use Cases

  • Custom Data Sources: Build and implement custom data sources using PySpark DataSource API for reading from and writing to external systems.
  • Batch and Streaming Operations: Supports batch and streaming modes for both reading and writing data.
  • Use Case: A data scientist wants to read data from a MongoDB database and perform analysis on it using Apache Spark. This Skill can be used to create a custom data source for MongoDB that allows Spark to read data in batch or streaming mode.

Quick Start

To create a custom data source for reading data from a MongoDB database, use the spark-python-data-source skill and follow the instructions provided in the SKILL.md file.

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 connect Apache Spark to external systems using Python?

You can connect Apache Spark to external systems using Python by building custom data sources with the PySpark DataSource API. This approach provides batch and streaming data access to databases, APIs, and message queues without requiring native JVM connectors.

Can I read and write data to external APIs in streaming mode with PySpark?

Yes, PySpark custom data sources support both batch and streaming modes for reading and writing. This allows you to process real-time data streams from external APIs and write processed data back to external systems continuously.

What is the best way to build a custom Spark connector for MongoDB in Python?

The best way to build a custom Spark connector for MongoDB in Python is implementing the PySpark DataSource API. This method enables Spark to read data from MongoDB in batch or streaming mode for large-scale analysis.

Do I need pandas and boto3 to create custom PySpark data sources?

You need PySpark and Python to create custom data sources, while pandas, numpy, requests, and boto3 are relevant libraries for accessing specific external systems like APIs or AWS services during data connectivity operations.

Does the PySpark DataSource API support writing to external databases?

Yes, the PySpark DataSource API supports writing to external databases. You can implement custom data sources that handle both read and write operations, enabling Apache Spark to push processed data back to external systems.

Why use Python instead of Scala for Spark data source implementation?

Using Python for Spark data source implementation avoids the need for JVM-based Scala development. The PySpark DataSource API directly integrates Python libraries like requests and pandas to connect Spark with external systems for data processing.