datacontract export converts a data contract to a target format. Use it to generate DDL, schemas, models, documentation, and data-quality artifacts directly from the contract.
datacontract export html datacontract.yaml --output datacontract.html
Run datacontract export <format> --help to see the format-specific options (e.g. datacontract export sql --help). If a format you need is missing, open an issue on GitHub.
For SQL dialects (postgres, mysql, snowflake, databricks, sqlserver, trino, oracle, clickhouse), use datacontract export sql --dialect <dialect>.
The examples on each export page are generated from the same data contract, so you can compare formats side by side:
examples/orders/orders.odcs.yaml — an orders and line_items schema with a Snowflake and a BigQuery server. Used by most pages.examples/user_interactions/user_interactions.odcs.yaml — a Databricks contract with DQX quality rules. Used by the dqx page.Download a file and run the commands below against it to reproduce the output.
See the export command reference for the common signature.