Skip to main content

Sparta

Library to help ETL using Pyspark.

Sparta is a simple library to help you work on ETL builds using PySpark.

Important Sources

Installation

Install the latest version with pip install pysparta

Documentation

Sparta

Modules

Extract

This is a module with functions for extracting and reading data.

Example

from sparta.extract import read_with_schema

schema = 'epidemiological_week LONG, date DATE, order_for_place INT, state STRING, city STRING, city_ibge_code LONG, place_type STRING, last_available_confirmed INT'
path = '/content/sample_data/covid19-e0534be4ad17411e81305aba2d9194d9.csv'
df = read_with_schema(path, schema, {'header': 'true'}, 'csv')

Transformation

This is a module with data transformation functions

Example

from sparta.transformation import drop_duplicates

cols = ['longitude','latitude']
df = drop_duplicates(df, 'population', cols)

Load

This is a module with load and write functions.

Example

from sparta.load import create_hive_table

create_hive_table(df, "table_name", 5, "col1", "col2", "col3")

Others

This is a module with several functions that can help in ETL work.

Example

from sparta.secret import get_secret_aws

get_secret_aws('Nome_Secret', 'sa-east-1')

Supported PySpark / Python versions

Sparta currently supports PySpark 3.0+ and Python 3.7+.

Metadata

Release files for pysparta 0.5.6

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

Source distribution (sdist)

Source distribution for pysparta 0.5.6
File Size Uploaded Provenance Actions
pysparta-0.5.6.tar.gz 21.8 kB Without provenance Details for pysparta-0.5.6.tar.gz

Built distribution (wheel)

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

Total release size: 46.7 kB

Release files / pysparta-0.5.6.tar.gz

Download URL pysparta-0.5.6.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
41dbbc9b00cc9d7fda7007f200db46a1cc1f4090b2a6d4b9682d2266c296740f
BLAKE2b-256 checksum
How to use checksums
1073db5eefadd41ee7713aa7aef2f4cd34e1ec371b12aaa5a9375874c5df7aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Release files / pysparta-0.5.6-py3-none-any.whl

Download URL pysparta-0.5.6-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e8d0106bfed06873dcbd405eb43b323b21a9ddc50f21598fde0199ed2d0b171
BLAKE2b-256 checksum
How to use checksums
4abf1ee2defecf34d6e9195410fe67073fe99ae2eaea738064e2a82a3a908dbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Security for pysparta 0.5.6

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