Skip to main content
Pre-release

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

ucmodel

Not affiliated with or endorsed by Databricks.

Reads a Databricks Unity Catalog over REST into a normalised model, compiles source DDL into the same model, and compares two models. It needs no SQL warehouse. ucstate and ucatlas are built on it.

Its command takes a snapshot of a catalog, a file that is written once and never edited, and reports what changed between two snapshots:

ucmodel --profile my-profile snapshot --catalog my_dev   # prints snapshots/my_dev-<time>-<hash>.json
ucmodel diff snapshots/OLDER.json snapshots/NEWER.json   # exits 1 when anything changed
ucmodel diff OLDER.json NEWER.json --format markdown     # or json

snapshot reads every schema but information_schema, or those named with --schema, and their lineage unless --no-lineage. Reading takes about three API calls per table, and lineage one more per table and per column. The file holds a hash of its contents, and diff refuses a file that was changed after it was taken. It holds what the API returns, owners' names included.

  • workspace.py makes the REST and SQL calls. It connects with a named CLI profile or with DATABRICKS_* variables, and never with a profile nobody named.
  • reader.py reads the raw REST state of some schemas.
  • normalise.py turns that into the model: one dict per object, keyed kind:schema.name, without the catalog.
  • compiler.py turns source DDL into the model a shadow catalog would give, offline, for the statements it knows, and declines the rest (docs/offline.md).
  • model.py compares two models, hashes an object, and says what an object depends on.
  • lineage.py reads table and column lineage over REST.
  • snapshot.py takes, writes and loads snapshots, and report.py says what changed between two. cli.py is the ucmodel command.
  • sqltext.py splits statements, strips catalogs, compares SQL text by tokens, and quotes names and strings.
  • samples/ holds three schemas' raw REST state, so that tests need no workspace. Its docstring says how to save them again.
from ucmodel import reader
from ucmodel.normalise import normalise
from ucmodel.workspace import Workspace

ws = Workspace.connect("my-profile")
model = normalise(reader.read(ws, "ucstate_prod", reader.schemas(ws, "ucstate_prod")))

It has been tested only on a Databricks Free Edition workspace.

Metadata

Release files for ucmodel 0.1.0a2

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

Source distribution (sdist)

Source distribution for ucmodel 0.1.0a2
File Size Uploaded Provenance Actions
ucmodel-0.1.0a2.tar.gz 60.4 kB With provenance Details for ucmodel-0.1.0a2.tar.gz

Built distribution (wheel)

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

Total release size: 118.9 kB

Release files / ucmodel-0.1.0a2.tar.gz

Download URL ucmodel-0.1.0a2.tar.gz
Size 60.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e352b48c5bd3dd59825ad2e19fda2d9b7213ab215d8b800dd5f98d741cf004ad
BLAKE2b-256 checksum
How to use checksums
2ca7883dcd920a22e87060915512ffdcc235975b959fc52726be490b4ab5fb56
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 3, 2026.

Transparency log

Release files / ucmodel-0.1.0a2-py3-none-any.whl

Download URL ucmodel-0.1.0a2-py3-none-any.whl
Size 58.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c39e2e57a2fed12bb9d4e8450b0a053a4c1ff933b480f9b8f8b46d9c37684c27
BLAKE2b-256 checksum
How to use checksums
560a64d41053ee6c9ed419f62876d908c32f746c044b38a96e9ed14585af061b
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 3, 2026.

Transparency log

Security for ucmodel 0.1.0a2

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 ucmodel-0.1.0a2.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 3, 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