Skip to main content

Spark + Delta Lake orchestration for medallion pipelines: CDC, SCD Type 2, data quality, lineage, and Excel reporting

Project description

HanduFlow

Spark + Delta Lake orchestration for medallion pipelines: bronze ingest, data quality, CDC, SCD Type 2, lineage, and Excel reporting — driven by master_specs.xlsx and JSON feed specs.

Works locally (Hive) and on Databricks Unity Catalog with the same code.


Install

pip install handuflow
# or from source
pip install -e .

Requires Java 11+, Python 3.10+, and a Spark session you provide.


Usage

from pyspark.sql import SparkSession
from handuflow import run

spark = SparkSession.builder.appName("HanduFlow").enableHiveSupport().getOrCreate()
result = run(spark, config_path="/path/to/handuflow_dir/config.ini")

print(result.status)       # COMPLETED | COMPLETED_WITH_ERRORS | ...
print(result.load_results)   # per-feed outcomes

Full API: documentation/API.md

from handuflow import (
    Orchestrator,
    RunResult,
    RunStatus,
    load_config,
    CatalogResolver,
    ConfigError,
    SOURCE_TO_BRONZE,
)

Setup

  1. Create handuflow_dir/ with config.ini, master_specs.xlsx, and output folders
  2. Define feeds in Excel + JSON
  3. Run handuflow.run(spark, config_path=...)

Step-by-step: documentation/SETUP.md
Template: files_dev/


Documentation

Doc Contents
RUN.md How to trigger pipeline, tests, local dev, restore
DEPLOYMENT.md Versioning, PyPI release, CI/CD, prod config
API.md Public Python API
MODULES.md Every file & module reference (74 modules)
SETUP.md Install, folders, config, run
CONFIG.md config.ini reference
MASTER_SPECS.md Excel columns & load types
FEED_SPECS.md Feed JSON keys
DATA_QUALITY.md DQ checks & reports
ERROR_CODES.md HF### error codes
SYSTEM_RESTORE.md Delta restore points (HFRP####)

Examples: documentation/examples/medallion/, documentation/examples/bronze/


Pipeline

Validate specs → Bronze extract → Pre-load DQ → Medallion loads → Post-load DQ → Excel report + lineage

Per-feed failures are isolated; the batch continues. See DATA_QUALITY.md.


Databricks

Set [PLATFORM] runtime_mode=unity_catalog, store config on Volumes, use real catalog names in master specs. Same run() API.


Development

CONTRIBUTING.md

pip install -e ".[dev]"
pytest tests/regression -v

Test layout: tests/README.md


License

Apache 2.0 — LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

handuflow-0.0.4.tar.gz (73.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

handuflow-0.0.4-py3-none-any.whl (103.7 kB view details)

Uploaded Python 3

File details

Details for the file handuflow-0.0.4.tar.gz.

File metadata

  • Download URL: handuflow-0.0.4.tar.gz
  • Upload date:
  • Size: 73.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for handuflow-0.0.4.tar.gz
Algorithm Hash digest
SHA256 33f3839876333ac900e977d10af341d1fd393950b8a6d9587ccef2f0a90855c1
MD5 756438cab34503bcb4248ab08f0efd42
BLAKE2b-256 7a95d9946ddfdb548b9d265b213f679530733126306c1306ca58131143ec17ca

See more details on using hashes here.

File details

Details for the file handuflow-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: handuflow-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 103.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for handuflow-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9fb1bccaa64c69b0a916dc95aaa5d15f5d79551cd7b52d887927e53372629697
MD5 ba5ceb18cfebd761821c0a0bb3959b08
BLAKE2b-256 fab8f110e50e3fe71784769b9d2586ed70754f6c3dd36567be3933b479dd8d64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page