SeedSpark is an Extensible PySpark utility package to create production spark pipelines and dev-test them in dev environments
Project description
SeedSpark
SeedSpark is an open-source is an Extensible PySpark utility package to create production spark pipelines and dev-test them in dev environments or to perform end to end tests. The goal is to enable rapid development of Spark pipelines via PySpark on Spark clusters and locally test the pipeline by using various utilities.
TODO
- Move logwrap [on top of loguru] extension out as a seperate package.
- Add Test containers for amundsen, etc..
Getting Started
- Setup SDKMAN
- Setup Java
- Setup Apache Spark
- Install Poetry
- Install Pre-commit and follow instruction in here
- Run tests locally
Setup SDKMAN
SDKMAN is a tool for managing parallel Versions of multiple Software Development Kits on any Unix based system. It provides a convenient command line interface for installing, switching, removing and listing Candidates. SDKMAN! installs smoothly on Mac OSX, Linux, WSL, Cygwin, etc... Support Bash and ZSH shells. See documentation on the SDKMAN! website.
Open your favourite terminal and enter the following:
$ curl -s https://get.sdkman.io | bash
If the environment needs tweaking for SDKMAN to be installed,
the installer will prompt you accordingly and ask you to restart.
Next, open a new terminal or enter:
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
Lastly, run the following code snippet to ensure that installation succeeded:
$ sdk version
Setup Java
Install Java Now open favourite terminal and enter the following:
List the AdoptOpenJDK OpenJDK versions
$ sdk list java
To install For Java 11
$ sdk install java 11.0.10.hs-adpt
To install For Java 11
$ sdk install java 8.0.292.hs-adpt
Setup Apache Spark
Install Java Now open favourite terminal and enter the following:
List the Apache Spark versions:
$ sdk list spark
To install For Spark 3
$ sdk install spark 3.0.2
To install For Spark 3.1
$ sdk install spark 3.0.2
Poetry
Poetry Commands
poetry install
poetry update
# --tree: List the dependencies as a tree.
# --latest (-l): Show the latest version.
# --outdated (-o): Show the latest version but only for packages that are outdated.
poetry show -o
Running Tests Locally
Take a look at tests in tests/dataquality
and tests/jobs
$ poetry run pytest
Ran 95 tests in 96.95s
NOTE: It's just curated stuff in this repo for personal usage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for seedspark-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74484487efa4dfd21db1263c90cd0813c1bf9836502a211fa9c087de4758016e |
|
MD5 | 91f480f10e517d58349e7619a1474d55 |
|
BLAKE2b-256 | bb197ecd700bb24a359f17eec2c86e49141c5b3c78f87c3c65c47a1c4a3e5c12 |