Skip to main content

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

Project description

delta-engine

Declarative schema management for Delta Lake tables on Databricks. You declare the state a table should have; the engine reads the state it actually has, computes the difference, checks that the difference is safe to apply, and runs exactly the DDL needed to close the gap.

There is no migration script to write and no DDL to hand-order. The declaration is the source of truth, and every sync reconciles the catalog to it.

Backends: delta-engine targets Delta Lake on Databricks with Unity Catalog today. The planning core is deliberately backend-free — backends plug in as adapters that read catalog state and execute plans — so other backends, such as open-source Unity Catalog, can be added without changing the model.

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 a Databricks environment, which provides Spark and Delta. See the installation guide for the [databricks] extra used for local development.

Quickstart

from delta_engine.databricks import build_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_engine(spark)  # `spark` is provided by your Databricks notebook
engine.sync(customers)         # creates the table, or no-ops if it already matches

What a sync does

Every sync runs the same phase chain for each table: read the current catalog state, diff it against your declaration, validate that the drift is safe to fix in place, plan deterministic DDL, order tables so foreign-key dependencies are created first, execute, and return a per-table SyncReport. Unsafe changes — dropping data, changing a column's type, repartitioning — fail validation with a named rule before any SQL runs.

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.3.0.tar.gz (278.8 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.3.0-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: delta_engine-0.3.0.tar.gz
  • Upload date:
  • Size: 278.8 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.3.0.tar.gz
Algorithm Hash digest
SHA256 226a320a46913cc178aae3de8749496a76c262120682ca44c86584c65e7689c4
MD5 e1dd42a1d8ff1b086f13cf934bfde744
BLAKE2b-256 65917b950891e8dae8876084025d52d581f1f5da33e834cffd7f3b4b75ec9007

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: delta_engine-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 80.4 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74d980a18002991dcec348cef0408e475a9cb8a0699a8b093610eacb4baa2d49
MD5 41f9f66971a53e2a64216dffe8640c3d
BLAKE2b-256 158613fd2f43e8791d381a80a22381eb0f4f6323f2b6a088942f676303aaf0f2

See more details on using hashes here.

Provenance

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