From e2a25bd9bd82e7c5dbaf86d4827708e8320333d6 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:29:22 -0400 Subject: [PATCH 1/3] Update dbt clean in migration guide for v1.7 --- .../dbt-versions/core-upgrade/02-upgrading-to-v1.7.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md index ed81de1394c..1d8f1a7d63c 100644 --- a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md +++ b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md @@ -58,7 +58,16 @@ dbt Core v1.5 introduced model governance which we're continuing to refine. v1. - **[Breaking change detection](/reference/resource-properties/versions#detecting-breaking-changes) for models with contracts enforced:** When dbt detects a breaking change to a model with an enforced contract during state comparison, it will now raise an error for versioned models and a warning for models that are not versioned. - **[Set `access` as a config](/reference/resource-configs/access):** You can now set a model's `access` within config blocks in the model's file or in the `dbt_project.yml` for an entire subfolder at once. - **[Type aliasing for model contracts](/reference/resource-configs/contract):** dbt will use each adapter's built-in type aliasing for user-provided data types—meaning you can now write `string` always, and dbt will translate to `text` on Postgres/Redshift. This is "on" by default, but you can opt-out. -- **[Raise warning for numeric types](/reference/resource-configs/contract):** Because of issues when putting `numeric` in model contracts without considering that default values such as `numeric(38,0)` might round decimals accordingly. dbt will now warn you if it finds a numeric type without specified precision/scale. +- **[Raise warning for numeric types](/reference/resource-configs/contract):** Because of issues when putting `numeric` in model contracts without considering that default values such as `numeric(38,0)` might round decimals accordingly. dbt will now warn you if it finds a numeric type without specified precision/ +scale. + +### dbt clean + +Starting in v1.7, `dbt clean` will only clean paths within the current working directory. The `--no-clean-project-files-only` flag will delete all paths specified in `clean-paths`, even if they're outside the dbt project. + +Supported flags: +- `--clean-project-files-only` (default) +- `--no-clean-project-files-only` ### Additional attributes in run_results.json From 4dd3cece2eab7e1afb2253318b385683849a330d Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:27:59 -0400 Subject: [PATCH 2/3] Update website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md Co-authored-by: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> --- .../docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md index 1d8f1a7d63c..b65869cbf2f 100644 --- a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md +++ b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md @@ -58,7 +58,7 @@ dbt Core v1.5 introduced model governance which we're continuing to refine. v1. - **[Breaking change detection](/reference/resource-properties/versions#detecting-breaking-changes) for models with contracts enforced:** When dbt detects a breaking change to a model with an enforced contract during state comparison, it will now raise an error for versioned models and a warning for models that are not versioned. - **[Set `access` as a config](/reference/resource-configs/access):** You can now set a model's `access` within config blocks in the model's file or in the `dbt_project.yml` for an entire subfolder at once. - **[Type aliasing for model contracts](/reference/resource-configs/contract):** dbt will use each adapter's built-in type aliasing for user-provided data types—meaning you can now write `string` always, and dbt will translate to `text` on Postgres/Redshift. This is "on" by default, but you can opt-out. -- **[Raise warning for numeric types](/reference/resource-configs/contract):** Because of issues when putting `numeric` in model contracts without considering that default values such as `numeric(38,0)` might round decimals accordingly. dbt will now warn you if it finds a numeric type without specified precision/ +- **[Raise warning for numeric types](/reference/resource-configs/contract):** Because of issues when putting `numeric` in model contracts without considering that default values such as `numeric(38,0)` might round decimals accordingly. dbt will now warn you if it finds a numeric type without specified precision/scale. scale. ### dbt clean From 1cb02d37bf37a7db3a8e829bd7f41a89bc89ae57 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:28:04 -0400 Subject: [PATCH 3/3] Update website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md Co-authored-by: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> --- .../docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md index b65869cbf2f..e13994031cf 100644 --- a/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md +++ b/website/docs/docs/dbt-versions/core-upgrade/02-upgrading-to-v1.7.md @@ -59,7 +59,6 @@ dbt Core v1.5 introduced model governance which we're continuing to refine. v1. - **[Set `access` as a config](/reference/resource-configs/access):** You can now set a model's `access` within config blocks in the model's file or in the `dbt_project.yml` for an entire subfolder at once. - **[Type aliasing for model contracts](/reference/resource-configs/contract):** dbt will use each adapter's built-in type aliasing for user-provided data types—meaning you can now write `string` always, and dbt will translate to `text` on Postgres/Redshift. This is "on" by default, but you can opt-out. - **[Raise warning for numeric types](/reference/resource-configs/contract):** Because of issues when putting `numeric` in model contracts without considering that default values such as `numeric(38,0)` might round decimals accordingly. dbt will now warn you if it finds a numeric type without specified precision/scale. -scale. ### dbt clean