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

Uploaded Python 3

File details

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

File metadata

  • Download URL: handuflow-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 447c36d744b48a86fe5d0a91609f14f63f6010b401dda3f2719ccc169a5edb07
MD5 b0fb1fec7151a5c1caf40643cb805222
BLAKE2b-256 f1ad08710b3d7fb7f4a42ba30c4014398f0367bd4fb2b443b6986d8546159ce8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: handuflow-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e36fe0258bd8e1d3cdf7592a659cc57dd55fc826b30c778ba4a3ae666ef68c83
MD5 46902217e6df9648bdc89ac01bf6591f
BLAKE2b-256 aa826be9ccf97fb51ee4a7b665ca81b01c319e8255da58d6ab8c7175d23a503e

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