Skip to main content

datacontract dbt sync

Generate dbt tests from an ODCS contract and run them. Within the dbt project, this wipes and regenerates <model-paths>/datacontract_cli/ and <test-paths>/datacontract_cli/, then runs dbt test. See the dbt Integration guide.

datacontract dbt sync [CONTRACT]
ArgumentDescription
CONTRACTPath to the ODCS contract. If omitted, searches for a single *.odcs.yaml in the current directory and subdirectories.
OptionDefaultDescription
--project-dircurrent dirPath to the dbt project root (must contain dbt_project.yml).
--schema-nameallWhich ODCS schema to sync, by name.
--model-resolutionnameMap an ODCS schema to a dbt model name: name or physicalName.
--targetForwarded to dbt test --target.
--profiles-dirForwarded to dbt test --profiles-dir.
--skip-tests / --run-tests--run-testsGenerate tests but skip running dbt test.
--publishURL to publish the results to.
--serverODCS server name for published test results.
--ssl-verification / --no-...onSSL verification when publishing.
--debug / --no-debugoffEnable debug logging.
datacontract dbt sync orders.odcs.yaml --project-dir ./warehouse