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.1.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.1-py3-none-any.whl (103.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: handuflow-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 89a16f77ad5417b620442da19b55cbfdf6fab7cc767645c2d766644967947810
MD5 3a89b53b3c8dea8a3b68c0411db5ac62
BLAKE2b-256 dd964c329d03c89ca0cfaef18b1d78bc4bd72aebbe8cd392dd3eedb01c506f09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: handuflow-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17407e3eba271ab7a7b03363a7a258734da6ce4576ca2218e42dc3f4e07c24a6
MD5 d643b027eabdbfc979189310cede9d5e
BLAKE2b-256 88bdab70aeec0c4f2fa053b0c7e3b233c1c6e7a90e4c7529ace234ead81e18da

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