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 (for contributors)

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.2.0.tar.gz (267.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.2.0-py3-none-any.whl (77.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: delta_engine-0.2.0.tar.gz
  • Upload date:
  • Size: 267.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 d0dbd766687e6b7fbb8a28705b5f5138e06151b54f033c4707eeb1d6a1acbdac
MD5 0bcbee87d24075c88cbac9a1a0da8ffb
BLAKE2b-256 24d187756bbaf8d0d9be7cdf816ac93c60452012bf499caab6673ccf19857a01

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: delta_engine-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 77.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a1e6ffc28588f3801e141b131cf34f2c6b8e1925e88c96145ebf4b5ac21ad22
MD5 7e2c2abece47033f622ff9fdfa955138
BLAKE2b-256 57ea300a9dbaf1812689e373cf78bd73dfaa4698de573080dc05b4acaef7c17b

See more details on using hashes here.

Provenance

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