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.4.0.tar.gz (392.1 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.4.0-py3-none-any.whl (104.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for delta_engine-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3decdedd89f84007e7de96ee01ec63438a3136bd8a4e8b0445e274e65710f168
MD5 97d2cb65a410693376e98fc39a691c4c
BLAKE2b-256 5ffc9c1f9a129ad0ab1629ed7902ce199c79378d739e5c39e1dd02d2ebbe2421

See more details on using hashes here.

Provenance

The following attestation bundles were made for delta_engine-0.4.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.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for delta_engine-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f85299d286831b852d09b632ab010976c08a6e5defc261356a409fbe55e930f9
MD5 17bb030af545156010f589d77ca7b2d1
BLAKE2b-256 496963fa4e5e992eea28f793a6e190431b1f8be8c9e1cbe6fa05f6d151a8631d

See more details on using hashes here.

Provenance

The following attestation bundles were made for delta_engine-0.4.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