From 755e6176c1e9f229ed654d7a2b8e4bb7bf2c1515 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 29 Nov 2024 10:45:16 +0000 Subject: [PATCH] add snippet --- .../docs/collaborate/govern/model-contracts.md | 14 ++++++-------- .../docs/reference/resource-properties/versions.md | 14 +++++++------- website/snippets/_versions-contracts.md | 7 +++++++ 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 website/snippets/_versions-contracts.md diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index d30024157c8..9b75e518719 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -205,13 +205,11 @@ At the same time, for models with many columns, we understand that this can mean 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). -- Removing a contracted model by deleting, renaming, or disabling it (dbt v1.9 or higher). - - versioned models will raise an error. - - unversioned models will raise a warning. +import BreakingChanges from '/snippets/_versions-contracts.md'; -More details are available in the [contract reference](/reference/resource-configs/contract#detecting-breaking-changes). + +More details are available in the [contract reference](/reference/resource-configs/contract#detecting-breaking-changes). diff --git a/website/docs/reference/resource-properties/versions.md b/website/docs/reference/resource-properties/versions.md index f6b71852aef..748aa477a4f 100644 --- a/website/docs/reference/resource-properties/versions.md +++ b/website/docs/reference/resource-properties/versions.md @@ -73,13 +73,13 @@ Note that the value of `defined_in` and the `alias` configuration of a model are When you use the `state:modified` selection method in Slim CI, dbt will detect changes to versioned model contracts, and raise an error if any of those changes could be breaking for downstream consumers. -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) -- Changing unversioned, contracted models. - - dbt also warns if a model has or had a contract but isn't versioned - +import BreakingChanges from '/snippets/_versions-contracts.md'; + + + diff --git a/website/snippets/_versions-contracts.md b/website/snippets/_versions-contracts.md new file mode 100644 index 00000000000..1207e02fba9 --- /dev/null +++ b/website/snippets/_versions-contracts.md @@ -0,0 +1,7 @@ +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) +- {props.value} + - {props.value2}