schema.yml files into ODCS YAML and applying it with armor contract apply.
One-line pipeline
contract apply reads from stdin when passed -f -. If the adapter maps zero models, it refuses to emit (non-zero exit) so the pipeline fails clean instead of clobbering your live config with an empty contract.
Prefer a two-step flow for anything non-trivial:
What the adapter reads
Runningarmor migrate-from dbt <project> walks the project root recursively and parses every schema.yml / schema.yaml file. It skips:
dbt_packages/anddbt_modules/(vendored third-party packages, not your models).node_modules/(front-end tooling that sometimes coexists with dbt repos).- Any hidden directory (a path segment starting with
.).
dbt_project.yml. The adapter does not call dbt compile or dbt parse, so you do not need a live target or a working profiles.yml. Static file scan only.
Mapping table
Everything the adapter understands lands in the emitted YAML. Everything else lands in the warnings section of the summary line so you know what to review.
What gets skipped (and why)
The CLI summary prints a one-liner that groups these warnings so you see totals at a glance:
mapped_count is zero, the adapter exits non-zero and writes nothing to stdout.
Flags
Validate before applying
contract validate runs the document against the ODCS v3.1.0 JSON Schema. Parse or schema errors print with file path, YAML path, and line number so editors and CI can surface them inline. No DB connection required beyond auth.
One dbt project, many assets
Todaycontract apply is asset-scoped (one asset per call). If your dbt project covers multiple warehouse tables:
- Translate once:
armor migrate-from dbt ./proj -o full.yaml. - Split by table or re-export per-asset from AnomalyArmor to get the target asset scoping, then apply each file against its asset.
Common Questions
How do I migrate from dbt tests to AnomalyArmor?
Runarmor migrate-from dbt ./my-dbt-project/ and pipe the ODCS YAML into armor contract apply --asset <uuid> -f -. The adapter reads every schema.yml statically, so you don’t need a live warehouse or working profiles.yml. See the one-line pipeline.
Which dbt tests does AnomalyArmor support?
Built-innot_null, unique, and accepted_values tests map to AnomalyArmor validity rules. Column description, data_type, and model description land in native ODCS fields. Freshness configs convert into hour-based SLAs. See the full mapping table.
Why does the adapter skip dbt_utils and dbt_expectations tests?
Those tests have too many variants to map safely into AnomalyArmor’s validity rules without risking silent mistranslation, so the adapter warns rather than guesses. Re-author them as custom SQL checks in AnomalyArmor. The CLI summary groups the warnings so you see totals at a glance.
Do I need dbt installed to run the migration?
No. The adapter is a static file scan, it walks the project directory and parsesschema.yml files directly. You don’t need dbt compile, dbt parse, a live target, or a working profiles.yml.
Can I preview the migration before applying it?
Yes. Write the translated YAML to a file first witharmor migrate-from dbt ./proj -o from-dbt.yaml, then run armor contract validate and armor contract plan against it. Plan shows a per-domain diff (additions, modifications, deletions) without mutating anything. See Validate before applying.
How do I migrate a dbt project that covers many warehouse tables?
contract apply is asset-scoped today (one call per asset), so translate once with armor migrate-from dbt ./proj -o full.yaml, then apply the file against each target asset. For a true bulk flow, use the REST bulk-apply endpoint. A CLI shortcut is on the roadmap.
See also
- Data Contracts (ODCS export/import)
- Migrate from Great Expectations
- anomalyarmor.ai/migrate for Soda users (ODCS export is native in Soda)
