Skip to content

Commit

Permalink
Adding breaking changes FAQ (#3913)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Adding a section to model contracts conceptual page to address breaking
changes and link to reference guide.

## Checklist

- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
matthewshaver authored Aug 31, 2023
2 parents bfc18a4 + 9c0342d commit c833748
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/docs/docs/collaborate/govern/model-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,14 @@ In some cases, you can replace a test with its equivalent constraint. This has t
Currently, dbt contracts apply to **all** columns defined in a model, and they require declaring explicit expectations about **all** of those columns. The explicit declaration of a contract is not an accident—it's very much the intent of this feature.

We are investigating the feasibility of supporting "inferred" or "partial" contracts in the future. This would enable you to define constraints and strict data typing for a subset of columns, while still detecting breaking changes on other columns by comparing against the same model in production. If you're interested, please upvote or comment on [dbt-core#7432](https://github.com/dbt-labs/dbt-core/issues/7432).

### How are breaking changes handled?

When comparing to a previous project state, dbt will look for breaking changes that could impact downstream consumers. If breaking changes are detected, dbt will present a contract error.

Breaking changes include:
- Removing an existing column
- Changing the `data_type` of an existing column
- Removing or modifying one of the `constraints` on an existing column (dbt v1.6 or higher)

More details are available in the [contract reference](/reference/resource-configs/contract#detecting-breaking-changes).

0 comments on commit c833748

Please sign in to comment.