---
title: "dbt model contracts enforce YAML column names, types, and constraints | ARAMAI"
description: "Reference docs for dbt’s contract config: enforced schema match for supported SQL materializations, with type aliasing notes."
canonical: "https://www.aramai.net/resources/article-summary/rsum-contract-dbt-developer-hub-81305ea7"
last_updated: "2026-09-14"
---

Highlight

# dbt model contracts enforce YAML column names, types, and constraints

contract | dbt Developer Hub

Reference docs for dbt’s contract config: enforced schema match for supported SQL materializations, with type aliasing notes.

Curated by Aramai Editorial

## Based on

[contract | dbt Developer Hub](https://docs.getdbt.com/reference/resource-configs/contract)

dbt Labs

[Read original article →](https://docs.getdbt.com/reference/resource-configs/contract)

The extract states that an enforced contract checks the model output against YAML attributes—every column’s name and data_type, plus additional constraints where the materialization and platform allow. It argues subtle type changes can fail downstream queries in surprising ways, so contracts give control over schema enforcement on one model or many.

For data engineering teams, the prerequisites matter as much as the promise: contracts apply via dbt_project.yml or properties YAML on SQL table, view (names and types only), and incremental models under specific on_schema_change settings. Python models, ephemeral and materialized views, recursive CTEs on BigQuery, and non-model resources are called out as unsupported.

This is schema-as-agreement: the YAML definition becomes the shared shape consumers can rely on across systems. Built-in type aliasing (for example string to text on Postgres/Redshift) keeps that shared shape portable across platforms without inventing a separate type system per warehouse.

Put this to work on CoreModels

## Related connectors and recipes

[dbtPlatformMeaning has no home in dbt. Bring a manifest; we turn `accepted_values` into a vocabulary you can govern and your agent can read.](https://www.coremodels.io/connector/dbt)

- [GuideEvery Line Has a Source: Inside the dbt Contract Generator](https://www.coremodels.io/connector/dbt/t5-deep-dive)
- [GuideSix Refusals: What CoreModels Will Not Do to Your dbt Project](https://www.coremodels.io/connector/dbt/h3-governance)

[ODCSFormatMake the contract a derived artifact of governed meaning, not a YAML twin of the table.](https://www.coremodels.io/connector/odcs)

[See all connectors →](https://www.coremodels.io/connectors)

## Abstract

When a contract is enforced, dbt requires the model’s returned dataset to match YAML-defined column names, data types, and supported constraints. The goal is predictable columns for downstream users inside and outside dbt, because even a boolean-to-integer type shift can break queries. Support is limited to certain SQL materializations and platforms; Python models, ephemeral models, and several other resource types are excluded.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

contractsschemadata typesconstraintsyamldbtData ContractsSchemas & ShapesData GovernanceData Engineering

Share

## Take the next step

Try CoreModels, talk with our team, or explore more resources.

[Try CoreModels](https://www.coremodels.io/pricing)[Talk to us](https://www.aramai.net/contact/eyJleHRyYURhdGEiOiJyZXNvdXJjZXMtY29udGFjdCIsInJlcXVlc3RTb3VyY2UiOiJBYm91dFVzUGFnZUFyYW1haSJ9)[More resources](https://www.aramai.net/resources)

## Sitemap

- [Sitemap in markdown](https://www.aramai.net/sitemap.md)
