Skip to main content

dcmassist

Turn an existing Snowflake database into a DCM project in seconds.

You've decided to manage your Snowflake schema with Declarative Change Management. Now you need a DEFINE TABLE … block for every table, view, schema, stage, sequence, file format, and tag you already have. Hand-writing thousands of these is the wrong way to start.

Point dcmassist at your database and it produces a complete, ready-to-commit DCM project — manifest.yml, Makefile, definitions, optional macros, the lot.

uvx dcmassist export --database MYDB --out-folder ./my-dcm-project

That's it. Commit, deploy, done.

Why dcmassist

  • Zero-to-DCM in one command. No bespoke scripts, no copy-pasting from GET_DDL, no fixing up identifier quoting by hand.
  • Multi-environment from day one. Database names are templated to {{ database }} automatically, so the same project deploys to dev, staging, and prod.
  • Safe with secrets. Stage definitions are synthesized without credentials — credentials live on storage integrations, not in git. You won't accidentally commit AWS keys.
  • Built for real Snowflake accounts. Paginates SHOW past the 10K-row cap. Quotes identifiers properly so leading-digit and lowercase names survive. Skips objects your role can't see instead of failing the run.
  • Predictable output. Per-type files, deterministic ordering, automatic chunking when a type grows beyond a threshold. Diffs stay readable as your project evolves.
  • Jinja macros by default. Every definition is a one-line macro invocation, so a column rename touches one file instead of hundreds. Pass --no-use-macros to emit raw DDL instead.
  • Observable runs. Live status panel while it works; a per-run log file you can tail when something looks wrong.

What you get

my-dcm-project/
├── manifest.yml                # targets, configurations, templating defaults
├── Makefile                    # deploy, plan, sync, validate
├── dcmassist-export.log        # per-run log of options + per-object results
└── sources/
    ├── definitions/
    │   ├── schema.sql          # one file per type
    │   ├── table.sql           # auto-chunked into table2.sql, table3.sql … past the threshold
    │   ├── view.sql
    │   ├── sequence.sql
    │   ├── stage.sql           # synthesized — no credentials
    │   ├── file_format.sql
    │   └── tag.sql
    └── macros/                 # default; suppress with --no-use-macros
        └── <type>.sql

Run

Requires Python ≥ 3.10, uv, and a configured snow CLI connection.

dcmassist is a one-shot tool — you run it when you need a DCM project and rarely after that. The simplest way is uvx, which fetches and runs without a permanent install:

uvx dcmassist export --database MYDB

Pin a version for reproducibility:

uvx dcmassist@0.1.15 export --database MYDB

If you'd rather keep it installed:

uv tool install dcmassist
# or
pipx install dcmassist

Quick examples

The examples below use uvx; substitute dcmassist if you've installed it.

Just tables and views from one schema, into a custom folder:

uvx dcmassist export \
    --database MYDB \
    --schema PUBLIC \
    --include Table --include View \
    --out-folder ./project

Multi-environment manifest with templated configurations:

uvx dcmassist export \
    --database MYDB \
    --target dev --target prod \
    --configuration STAGING \
    --templating-default warehouse=COMPUTE_WH

Run uvx dcmassist export --help for every option.

Type support

Implemented: Schema, Table, View, Sequence, Stage, File format, Tag.

Recognized but not yet exported: Dynamic table, Task, Alert, SQL function, Data metric function, SQL procedure, Role, Database role, Grant, Authentication policy. Including these in --include is accepted (they pass validation) but they produce no output yet — contributions welcome.

Database is intentionally never exported: DCM rejects DEFINE DATABASE for the project's own parent database.

Configuration

Environment variable Effect
DCMASSIST_EXPORT_OBJECTS_PER_FILE Max objects per chunked SQL file (default: 100). Lower it if your DDL files grow uncomfortably large.
DCMASSIST_NO_STATUS=1 Disable the live status panel (also auto-disabled on non-TTY and NO_COLOR=1).
Exit code Meaning
0 Success
4 Ran to completion but exported nothing — every object failed (typically permission errors)
5 Setup error — bad env var, or non-empty output folder without --force

Known limitations

  • Pre-existing objects not owned by your role. dcmassist exports every object the running role can see, but snow dcm plan only succeeds for objects the running role owns. Visible-but-not-owned objects produce errors like File_format 'JSON' already exists, but current role has no privileges on it during snow dcm plan. The cleanest workaround is to run dcmassist export (and the resulting snow dcm plan) as a role that owns the objects you want to manage — typically ACCOUNTADMIN, or a custom role with ownership on the relevant schemas. Alternatively, prune the unwanted objects from the generated sources/definitions/*.sql files before deploying.

Project status

Pre-1.0. The output layout, CLI flags, and log format are stable enough to use; expect breaking changes between minor versions until 1.0. Issues and pull requests welcome at github.com/jamiekt/dcmassist.

License

MIT.

Metadata

Release files for dcmassist 0.8.42

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

Source distribution (sdist)

Source distribution for dcmassist 0.8.42
File Size Uploaded Provenance
dcmassist-0.8.42.tar.gz 184.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dcmassist 0.8.42
File Interpreter ABI Platform
dcmassist-0.8.42-py3-none-any.whl Python 3 none any Details

Total release size: 235.6 kB

Release files / dcmassist-0.8.42.tar.gz

Download URL dcmassist-0.8.42.tar.gz
Size 184.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c61bb0b76b835f8c15ee2651cb0b595ea541813b94d47e5e32468b53535bcee
BLAKE2b-256 checksum
How to use checksums
159b4833ed0d52676e51ca8370a9a3b6a2b5296274da8603e8275112b9aa6723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 26, 2026.

Transparency log

Release files / dcmassist-0.8.42-py3-none-any.whl

Download URL dcmassist-0.8.42-py3-none-any.whl
Size 51.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd9494f677dfa3056bd5071856fc95b96703fa3e8a8185f511a45e6e1360c927
BLAKE2b-256 checksum
How to use checksums
5dddef63fd1a54569f96c021e39bd0248deebdcef0c155399c1f2bc170390606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 26, 2026.

Transparency log

Security for dcmassist 0.8.42

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 dcmassist-0.8.42.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 May 26, 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.

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