What are the advantages of DataKitchen's TestGen's data contracts over data contracts in DBT?

dbt model contracts don't support ODCS, the Open Data Contract Standard. TestGen imports and exports it. TestGen also generates tests from profiling, gives stewards and business users a web UI, exposes contracts to AI assistants through an MCP server, and uses catalog metadata to decide what matters. Keep dbt as the build gate, since it blocks a bad write.

Key points

  • dbt model contracts do not support ODCS, the Open Data Contract Standard maintained by Bitol under the Linux Foundation; a dbt contract is a contract block in dbt's own YAML that fixes a model's column names and data types.
  • TestGen profiles tables on 55 column characteristics and generates tests from 34 test types, using profiling results plus catalog metadata, and excluded columns stay out. dbt has four built-in generic tests, no profile to generate from, and leaves the rest to you. DataKitchen estimates profiling generates about 80 percent of a contract's tests, and an LLM through the MCP server with business context takes it toward 90 percent.
  • A web UI lets engineers, data stewards, and business users work on the same tests and contract. dbt has dbt docs or a separate tool, and a model contract is YAML in git.
  • TestGen's MCP server lets an AI assistant import, read, edit, freeze, compare, and export contracts, and run test generation. dbt has no MCP server for contracts.
  • dbt stays the better gate: a model contract stops a bad write before the table is written, and TestGen blocks nothing unless a pipeline step fails on its results.

A warehouse table drawn twice: on the dbt side a few hand-written checks and a model contract for column names and types; on the TestGen side nearly every column covered by generated checks and an ODCS contract with tests attached Figure 1: dbt tests and model contracts gate the build. TestGen profiles the tables dbt produces and generates the rest.

Automatic test generation from profiling and metadata

dbt’s four built-in generic tests cover uniqueness, nulls, accepted values, and relationships. Everything else is hand-written in YAML or SQL, one model at a time, even with dbt-expectations (now a Metaplane-maintained fork that adds about 60 test macros).

In practice, teams test primary keys and a few critical fields, because writing and maintaining tests across every layer (bronze, silver, gold) outruns the time they have. In DataKitchen’s analysis of 849 community comments, the top reason engineers don’t test is that nobody gives them the time. The full breakdown is in We just eyeball row counts and pray.

TestGen starts from the data. It profiles tables on 55 column characteristics, then uses those results plus catalog metadata to generate tests from 34 test types, alongside 32 data hygiene detectors. The tests include distribution, range, pattern, cardinality, completeness, and timeliness checks on columns nobody would hand-test. Table monitors for freshness, volume, and schema learn from each table’s history.

Generated tests treat the data as profiled as normal, so review them in the TestGen UI before you schedule them.

Business rules stay yours. 19 more test types, a separate set from the 34 generated ones, cover them and custom SQL, and you configure them. For the authoring comparison, including Great Expectations, read How is TestGen different from dbt tests and Great Expectations?. To judge whether your team has outgrown dbt tests, read When are dbt tests enough?.

Create a contract from a profiled table group, and TestGen generates the tests and an ODCS contract document. On DataKitchen’s five-table demo, that was 98 tests in one step. You can also import an ODCS file that another team or a supplier wrote. ODCS is the Open Data Contract Standard, maintained by Bitol under the Linux Foundation. Rules TestGen can’t check stay in the document but never run, and service levels are documented, not verified. A contract’s terms are data tests, as The terms and conditions of a data contract are data tests argues. Contracts shipped in TestGen 5.185.1 on November 12, 2026, in open source and Enterprise, as Data contracts ship in open source TestGen announced. Start from the data contracts page.

A dbt model contract is the hand-written counterpart. It fixes a model’s column names and data types, doesn’t apply to sources or seeds, and doesn’t speak ODCS. The dbt docs describe the full behavior. For what a data contract is and how to enforce one, see What is a data contract and how do you enforce one?

A UI, because data tests are a team sport

TestGen comes with a web UI. dbt has dbt docs or a separate tool, and its contracts live in YAML in git. Managing data tests is a collaboration: engineers run the pipelines, but data stewards and business users own what the data means, and they don’t edit YAML in a git repo. Data quality testing: a shared resource for modern data teams makes the case.

A Data Steward role can update catalog metadata and change test parameters without seeing PII or changing schedules. Tests carry timestamped notes and review flags, and the contract document is readable without SQL. DataKitchen enhances its support for data stewards describes the role, and Your best data quality rules live in someone else’s head explains why those people matter.

Contracts live in numbered versions. You edit a draft, then freeze it, and only runs of the active version count toward results, scores, and notifications. The UI compares any two versions rule by rule or as documents. For why a contract is really communication between teams, read Data contracts are communication for data teams who dislike each other.

A rich MCP server and skills

TestGen has an MCP server. An AI assistant such as Claude, Cursor, or Copilot, with skills and context about your business, can import an ODCS file as a new contract or into a draft, and read the contract document whole or by section, table, or column. It can edit the draft, run test generation, and freeze the draft. It can compare versions test by test and as documents, list versions, discard a draft, and export a version as ODCS. dbt has no MCP server for contracts.

Setup is in How to use the TestGen MCP server with Claude, Cursor, and Copilot. The supported tools list has every tool.

Metadata that drives test creation in your domain

Profiling results plus catalog metadata tell generation what matters. That metadata means descriptions, tags, critical data elements, and PII and excluded flags. Stewards can bulk-load it by CSV import, including from an external catalog or semantic model, and excluded columns stay out of generation. dbt has no profile to generate from, and a dbt model contract holds only what someone typed.

These are DataKitchen’s estimates, from its data contracts webinar: profiling generates about 80 percent of a contract’s tests in about 60 seconds. An LLM working through the MCP server with business context takes it toward 90 percent. The last 10 percent lives in people’s heads, so business users add it in the TestGen UI. The recording is How to Do Data Contracts.

How the three compare

dbt testsdbt model contractsDataOps TestGen
AuthoringFour built-in generic tests, everything else hand-written in YAML or SQLColumns and types declared by hand, model by modelGenerated from a profile of the data
Who works in itEngineers, in YAML or SQL in gitEngineers, in YAML in gitEngineers, data stewards, and business users, in a web UI
CoverageUsually primary keys and a few critical fieldsModels only, not sources or seedsEvery profiled table, including distribution, range, pattern, cardinality, completeness, and timeliness checks
What a contract checksNo contract; each test checks one ruleColumn names and data typesA test behind each rule TestGen can check, plus a Schema Conformance test for drift from declared columns and types
Supports the ODCS standardNoNoYes: import, export, and compare ODCS documents
Contract formatYAML or SQL in your dbt projectdbt’s own format, not ODCSODCS, with import, export, and numbered versions
Results UI and monitorsdbt docs or a separate toolBuild fails on a mismatchWeb UI, data quality scorecards, and table monitors for freshness, volume, and schema that learn from each table’s history
Where it runsInside dbt buildInside dbt build, before the table is writtenIn the warehouse against tables, after or between builds, or from a pipeline step

What dbt does better

dbt tests run inside the build and stop bad models from building downstream. TestGen runs against the tables after, or between, builds unless you wire it into the pipeline.

dbt model contracts catch a column name or type change before the table is written, which TestGen can’t do. TestGen’s Schema Conformance test, which each declared table gets, covers the same columns and types but reports drift after the table lands. TestGen blocks nothing unless a pipeline step fails on its results.

Hand-written dbt tests also encode business rules that no profile can infer. Generation covers the routine tests. It doesn’t know your business.

Use both

Keep core dbt tests and model contracts as the gate inside dbt build. A failed test with error severity makes the models downstream of it skip.

Then point TestGen at the tables dbt produces. It connects to the warehouse and runs profiling and tests as SQL in place, without reading dbt’s SQL, YAML, or manifest. It generates the coverage nobody had time to write, monitors between runs, and holds the contract other teams read, in ODCS. A pipeline step after dbt build can call the TestGen REST API to run a test suite and fail if tests fail. The mechanics are in How TestGen fits into a dbt project.

Try the data contract walkthrough, then install open source TestGen and profile one dbt-built schema.

Frequently asked questions

Short answers to the follow-up questions people ask next.

Does TestGen replace dbt tests?

No. TestGen adds to dbt tests. dbt tests run inside the build and stop bad models from building downstream. Hand-written dbt tests encode business rules that no profile can infer. TestGen adds generated coverage on the tables dbt builds, plus monitors and an ODCS contract.

Does TestGen read my dbt models or manifest?

No. TestGen does not read dbt's SQL, YAML, or manifest. It connects to the warehouse and runs profiling and tests as SQL against the tables dbt builds. A pipeline step after dbt build can call the TestGen REST API to run a test suite.

Does a dbt model contract support the ODCS standard?

No. That matters because another team, a supplier, or another tool can't read a dbt contract as ODCS, while a TestGen contract can be exported as an ODCS file and imported elsewhere. A dbt model contract fixes a model's column names and data types, does not apply to sources or seeds, and does not speak ODCS. A TestGen contract is an ODCS document with a test behind each rule TestGen can check, and it can be imported or exported in that open format.

How much of my test suite can TestGen generate?

DataKitchen estimates TestGen generation covers about 80 percent of the routine tests a team needs, with no YAML or SQL written. That is an estimate, not a measured result. It refers to checks learned from the data itself, such as missing values, null anomalies, schema drift, volume changes, and referential integrity. The rest is business logic you write: 19 more test types, separate from the 34 generated ones, cover business rules and custom SQL, and you configure them. The estimate is described in No Python, no SQL templates, no YAML.

What does TestGen cost?

Open source TestGen is Apache 2.0 and free for one user, one database connection, and one project, with unlimited tables. Enterprise is $100 per user per month plus $100 per database connection per month. Data contracts are in both.

Try it on your own data

DataOps TestGen is free and open source. Profile a table and generate its tests this afternoon.