From cc0c83bee4fa00c5ac87e9b2884814e767aca911 Mon Sep 17 00:00:00 2001 From: Nathan Griffiths <126524848+nathangriffiths-cdx@users.noreply.github.com> Date: Thu, 26 Oct 2023 15:09:44 +1300 Subject: [PATCH 1/5] Update model-contracts.md for supported models Update to show that incremental models with on_schema_change: fail are actually supported. Reformat to make what is and isn't supported clearer. --- .../docs/docs/collaborate/govern/model-contracts.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index 442a20df1b6..1a734e212bc 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -28,10 +28,18 @@ While this is ideal for quick and iterative development, for some models, consta ## Where are contracts supported? At present, model contracts are supported for: -- SQL models. Contracts are not yet supported for Python models. -- Models materialized as `table`, `view`, and `incremental` (with `on_schema_change: append_new_columns`). Views offer limited support for column names and data types, but not `constraints`. Contracts are not supported for `ephemeral`-materialized models. +- SQL models. +- Models materialized as one of the following + - `table` + - `view`. Views offer limited support for column names and data types, but not `constraints`. + - `incremental` (with `on_schema_change: append_new_columns` or `on_schema_change: fail`). - Certain data platforms, but the supported and enforced `constraints` vary by platform. +Model contracts are **not** supported for: +- Python models. +- `ephemeral`-materialized SQL models. + + ## How to define a contract Let's say you have a model with a query like: From 7e72828d88a99d04021e2fadf8ada858ffbe0fd7 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:11:21 -0400 Subject: [PATCH 2/5] Apply suggestions from code review --- website/docs/docs/collaborate/govern/model-contracts.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index 1a734e212bc..700483ee91f 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -29,10 +29,10 @@ While this is ideal for quick and iterative development, for some models, consta At present, model contracts are supported for: - SQL models. -- Models materialized as one of the following +- Models materialized as one of the following: - `table` - - `view`. Views offer limited support for column names and data types, but not `constraints`. - - `incremental` (with `on_schema_change: append_new_columns` or `on_schema_change: fail`). + - `view` — Views offer limited support for column names and data types, but not `constraints`. + - `incremental` — with `on_schema_change: append_new_columns` or `on_schema_change: fail`. - Certain data platforms, but the supported and enforced `constraints` vary by platform. Model contracts are **not** supported for: From 9d494cb65e486d32f0a18f8f6ae856340992312a Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:11:48 -0400 Subject: [PATCH 3/5] Update website/docs/docs/collaborate/govern/model-contracts.md --- website/docs/docs/collaborate/govern/model-contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index 700483ee91f..464ecc48893 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -37,7 +37,7 @@ At present, model contracts are supported for: Model contracts are **not** supported for: - Python models. -- `ephemeral`-materialized SQL models. +- `ephemeral`— materialized SQL models. ## How to define a contract From 98e21bd93bcd288e5aa4749e50635d68671a4000 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:13:35 -0400 Subject: [PATCH 4/5] Apply suggestions from code review --- website/docs/docs/collaborate/govern/model-contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index 464ecc48893..700483ee91f 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -37,7 +37,7 @@ At present, model contracts are supported for: Model contracts are **not** supported for: - Python models. -- `ephemeral`— materialized SQL models. +- `ephemeral`-materialized SQL models. ## How to define a contract From 8ea4c59e627e5354f08cba91f05185ff1ee8d3d1 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:14:13 -0400 Subject: [PATCH 5/5] Update website/docs/docs/collaborate/govern/model-contracts.md --- website/docs/docs/collaborate/govern/model-contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/collaborate/govern/model-contracts.md b/website/docs/docs/collaborate/govern/model-contracts.md index 700483ee91f..ce3dca4d5f7 100644 --- a/website/docs/docs/collaborate/govern/model-contracts.md +++ b/website/docs/docs/collaborate/govern/model-contracts.md @@ -35,7 +35,7 @@ At present, model contracts are supported for: - `incremental` — with `on_schema_change: append_new_columns` or `on_schema_change: fail`. - Certain data platforms, but the supported and enforced `constraints` vary by platform. -Model contracts are **not** supported for: +Model contracts are _not_ supported for: - Python models. - `ephemeral`-materialized SQL models.