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.5.tar.gz (74.1 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.5-py3-none-any.whl (104.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: handuflow-0.0.5.tar.gz
  • Upload date:
  • Size: 74.1 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.5.tar.gz
Algorithm Hash digest
SHA256 93db727f1d0f9a8057b6c9244907790cf70e96e830ce4be12304a83e1ab5cc87
MD5 30eb7a75b2e559e88df2f8d0d5c7e4f8
BLAKE2b-256 af95a8a3d653ca58adbb26f866335d29ead0d48856339fe18aef5ea605f7de5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: handuflow-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 104.2 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7296de57d45819bee6dc86a1aa320c5c4de97044d126b944979ea72723f1da84
MD5 855cca2ddc07c1cba45e842f604375a7
BLAKE2b-256 e48b1902f5f104460096638f88906d320dfbc3f9241ebbc1c70ab0c89f83a4ff

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