Skip to main content

Framework for defining, validating, and evolving tables in a consistent, safe, and controlled way.

Project description

delta-engine

Live Databricks Tests

Declarative, safety-first schema and metadata management for Delta Lake tables on Databricks.

Define the state your tables should have in Python. Delta Engine reads their current Unity Catalog state, calculates the difference, validates whether each change is safe, and executes only the DDL needed to reconcile them.

There are no migration scripts to maintain and no DDL statements to hand-order. Your declarations remain the source of truth across the lifetime of the table.

What Delta Engine gives you

  • Desired-state reconciliation: declare the complete table state rather than a sequence of migrations.
  • Safe in-place evolution: unsafe changes, such as type narrowing, repartitioning or destructive schema changes, are rejected before any SQL runs.
  • Reviewable plans: preview semantic changes and compiled DDL with a dry run before applying them.
  • Drift detection: compare version-controlled declarations against the live Unity Catalog state in local workflows or CI.
  • Scoped ownership: manage governance metadata without taking ownership of a table’s schema or data lifecycle.
  • Dependency-aware execution: synchronise groups of tables in the correct order when primary-key and foreign-key relationships exist.

Delta Engine does not need to own how a table’s data is produced. It can manage the catalog state around tables populated by PySpark jobs, declarative pipelines, dbt models or other systems.

Install

pip install delta-engine

The base package is pure Python with no runtime dependencies: declaring and planning schemas needs no PySpark. Running a sync needs either a Spark session or a Databricks SQL warehouse connection. Inside a Databricks notebook, Spark is already provided; elsewhere, install the [spark] extra for local development against a Spark session, or the [sql] extra to sync through a SQL warehouse instead — schema sync from CI without a Spark session or cluster. See the installation guide for both extras and their requirements.

Install delta-engine[cli] to run delta-engine plan MODULE:ATTRIBUTE through any standard Databricks unified-auth configuration. The CLI always shows the semantic diff, report, and planned SQL and never applies the generated plan. See the CLI reference.

Quickstart

from delta_engine.databricks import build_spark_engine
from delta_engine.schema import Column, DeltaTable, Integer, String

customers = DeltaTable(
    catalog="dev",
    schema="silver",
    name="customers",
    columns=[
        Column("id", Integer(), nullable=False),
        Column("name", String()),
    ],
)

engine = build_spark_engine(spark)  # `spark` is provided by your Databricks notebook
engine.sync(customers)         # creates the table, or no-ops if it already matches

Every sync follows the same process:

read live state
    → compare with the declaration
    → validate the differences
    → build a deterministic plan
    → resolve table dependencies
    → execute

Validation happens before execution. When a table contains an unsafe change, Delta Engine does not execute a partially valid plan for that table.

Documentation

Start with how a sync works for the model, or jump to what you need:

Getting started

Concepts

How-to guides

Reference

Architecture

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

delta_engine-0.5.0.tar.gz (460.3 kB view details)

Uploaded Source

Built Distribution

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

delta_engine-0.5.0-py3-none-any.whl (107.0 kB view details)

Uploaded Python 3

File details

Details for the file delta_engine-0.5.0.tar.gz.

File metadata

  • Download URL: delta_engine-0.5.0.tar.gz
  • Upload date:
  • Size: 460.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for delta_engine-0.5.0.tar.gz
Algorithm Hash digest
SHA256 26cd6bc0e77d621b09ef6ef26b677ee03e6fe2fee537252dcc35a316ac0e92f5
MD5 01e100d30a288b40cd8f9bf965646a21
BLAKE2b-256 ab7b71601834a97e40a882ace5e37756f79233cf157ef1e1fcc8c6ecae34648c

See more details on using hashes here.

Provenance

The following attestation bundles were made for delta_engine-0.5.0.tar.gz:

Publisher: release.yaml on Tomoscorbin/delta-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file delta_engine-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: delta_engine-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 107.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for delta_engine-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04ea5b9f0998be64eabb6d308b694cad3ea1c18068468830fd5c4249ed7bb8f2
MD5 987e8228b22c6eb0677a094b5889f152
BLAKE2b-256 4f9cb37c49495fed41357bc1f8af6b981f4bc1c99d3f4ef3b1ac872178547088

See more details on using hashes here.

Provenance

The following attestation bundles were made for delta_engine-0.5.0-py3-none-any.whl:

Publisher: release.yaml on Tomoscorbin/delta-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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