Skip to content

Commit

Permalink
add snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Nov 29, 2024
1 parent f0e43bd commit 755e617
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
14 changes: 6 additions & 8 deletions website/docs/docs/collaborate/govern/model-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
<BreakingChanges
value="Removing a contracted model by deleting, renaming, or disabling it (dbt v1.9 or higher)."

Check warning on line 211 in website/docs/docs/collaborate/govern/model-contracts.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/docs/collaborate/govern/model-contracts.md#L211

[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'? ", "location": {"path": "website/docs/docs/collaborate/govern/model-contracts.md", "range": {"start": {"line": 211, "column": 80}}}, "severity": "WARNING"}
value2="versioned models will raise an error. unversioned models will raise a warning."
/>

More details are available in the [contract reference](/reference/resource-configs/contract#detecting-breaking-changes).
14 changes: 7 additions & 7 deletions website/docs/reference/resource-properties/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';

<BreakingChanges
value="Changing unversioned, contracted models."
value2="dbt also warns if a model has or had a contract but isn't versioned."
/>

<Tabs>

<TabItem value="unversioned" label="Example message for unversioned models">
Expand Down
7 changes: 7 additions & 0 deletions website/snippets/_versions-contracts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Breaking changes include:

- Removing an existing column
- Changing the data_type of an existing column

Check warning on line 4 in website/snippets/_versions-contracts.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/snippets/_versions-contracts.md#L4

[custom.Typos] Oops there's a typo -- did you really mean 'data_type'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'data_type'? ", "location": {"path": "website/snippets/_versions-contracts.md", "range": {"start": {"line": 4, "column": 16}}}, "severity": "WARNING"}
- Removing or modifying one of the `constraints` on an existing column (dbt v1.6 or higher)

Check warning on line 5 in website/snippets/_versions-contracts.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/snippets/_versions-contracts.md#L5

[custom.Typos] Oops there's a typo -- did you really mean 'v1.6'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.6'? ", "location": {"path": "website/snippets/_versions-contracts.md", "range": {"start": {"line": 5, "column": 77}}}, "severity": "WARNING"}
- {props.value}
- {props.value2}

0 comments on commit 755e617

Please sign in to comment.