Skip to main content

Pyspark ETL

This project aims at solving common problems that face data engineers.

One problem is to handle deeply nested json data and render data in a clean tabular format.

This kind of semistructured data may contain a combination of different data types that need to be handled differently to flatten the data properly.

This package does just that!

In this initial version of the package, there is one module named pysparketl which has one main function: flattenDF and two utility functions: _getArrayCols, _explodeArrayCols.

Usage

flattenDF(df) where df is a pyspark dataframe that has nested data in its columns. The returned dataframe will be a completely flat/tabular structure.

Example

Install the Package
pip install pysparketl
<!-- OR -->
pip3 install pysparketl
Import and Use
# Import the library
from pysparketl.dataframes import flattenDF

# Read your input dataframe that contains Json data
rawJsonDF = spark.read.json(pathToFile)

# Pass your nested json dataframe as input to the flattenDF function
flattenedDF = flattenDF(rawJsonDF)

# flattenedDF will be a flat dataframe instead as a result.

Metadata

Release files for pysparketl 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysparketl 0.0.3
File Size Uploaded Provenance
pysparketl-0.0.3.tar.gz 3.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pysparketl 0.0.3
File Interpreter ABI Platform
pysparketl-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / pysparketl-0.0.3.tar.gz

Download URL pysparketl-0.0.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7be1e057d99043a1f689f566e057f0559ba0353c7ac59ffe5a772e2ed4ca5a6f
BLAKE2b-256 checksum
How to use checksums
35d8d10d3d5552ed310ff45b999825bdbcf0d35687469946fbe5a6ce5065fcbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / pysparketl-0.0.3-py3-none-any.whl

Download URL pysparketl-0.0.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15693a4e60a232cf9564a01799402f198f52d2264107311dfa8735c54041740e
BLAKE2b-256 checksum
How to use checksums
603ac98bc7f1344c42a795bc2c6bcf79e7f0ebf48c6ff9e1dcef32bdb4c4323f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for pysparketl 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page