Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ucstate

Not affiliated with or endorsed by Databricks.

Desired-state management for a Databricks Unity Catalog. Schemas, tables, views, functions, volumes and grants are declared as SQL source files, one object per file. ucstate compiles them locally into a model, or builds them in an empty shadow catalog for what the compiler declines, compares the result with a target catalog, and plans and applies the changes. It reads the catalogs with ucmodel.

uv run ucstate --project catalog --profile my-profile plan --target dev
uv run ucstate --project catalog --profile my-profile apply --target dev
uv run ucstate --project catalog --profile my-profile history --target dev
uv run ucstate --project catalog --profile my-profile transition --target dev --object shop.orders
uv run ucstate --project catalog --profile my-profile rehearse --target dev
uv run ucstate --project catalog plan --against snapshots/ucstate_dev-20261101T120000Z-3f2a9c01b7de.json
uv run ucstate --project catalog rename-column shop.products sku stock_code
uv run ucstate --project catalog allow drop_table shop.old_orders

It does six things:

  • imports a target's live state as SQL source files;
  • compiles those files into the desired model, and builds a shadow catalog only for what the compiler declines. apply always builds one, and stops if the two disagree. --shadow forces the shadow;
  • plans the changes that bring a target catalog to the source;
  • rehearses a plan that depends on the rows, on clones of the target's tables;
  • applies a plan under a lock, verifies the result, and records the deployment and the deployed model in the target's _ucstate schema;
  • lists a target's deployments, and releases a lock left by an apply that died.

Each planned change carries a safety class, and runs only once it has what its class needs:

  • a precheck that finds no rows in the way, for checked;
  • the table property declared in the source, for one-way;
  • an allowance in project.yml, for destructive;
  • a transition script in migrations/, for rewrite;
  • for an ambiguous change, an entry in refactor.yml if it's a rename, or an allowance if it's a drop.

A blocked change lists the commands that would give it what it needs: rename-table, rename-column and allow each add one entry to refactor.yml or project.yml, and transition drafts a script. They need no workspace, except transition --target.

plan, compare and transition take --against a snapshot from ucmodel snapshot in place of the live target. They then need no workspace, provided the compiler accepts the whole source. Prechecks don't run, and every refactor.yml entry and script counts as not run yet. apply refuses a plan made this way.

scenarios/ is the planner's test corpus: before and after source trees for each kind of change, run against the workspace. examples/ holds what import writes for ucmodel's two samples.

The design is the repo's docs/design.md. It needs a SQL warehouse, for the shadow and for applying, and has been tested only on a Databricks Free Edition workspace.

Metadata

Release files for ucstate 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ucstate 0.1.0a1
File Size Uploaded Provenance Actions
ucstate-0.1.0a1.tar.gz 138.5 kB With provenance Details for ucstate-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ucstate 0.1.0a1
File Interpreter ABI Platform Actions
ucstate-0.1.0a1-py3-none-any.whl Python 3 none any Details for ucstate-0.1.0a1-py3-none-any.whl

Total release size: 187.5 kB

Release files / ucstate-0.1.0a1.tar.gz

Download URL ucstate-0.1.0a1.tar.gz
Size 138.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e0ad7e8e40bdbda0fad0ffd8ed0bf79ee6d052a7684c592e747544f310b55cdc
BLAKE2b-256 checksum
How to use checksums
24e39af916b127240075601b2066af060c95f6da3725a59221facf7961a097f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / ucstate-0.1.0a1-py3-none-any.whl

Download URL ucstate-0.1.0a1-py3-none-any.whl
Size 49.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acf191a5d9fb0a505d361f94831cbfce65a2afc709e73ca530a3ff8f615812a9
BLAKE2b-256 checksum
How to use checksums
08f65f9c3b4479021f4a7068e0a5393a162175813031ce575e5c48003db5c82e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for ucstate 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ucstate-0.1.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page