From 06fa231496929e286afd20059f405b7cbc14f8a6 Mon Sep 17 00:00:00 2001 From: Natalie Fiann Date: Wed, 25 Sep 2024 11:32:40 +0100 Subject: [PATCH 1/4] Updated Snapshot meta-fields section to highlight new config allows users to define names --- website/docs/docs/build/snapshots.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/docs/docs/build/snapshots.md b/website/docs/docs/build/snapshots.md index 82b5104fcef..928727cdb61 100644 --- a/website/docs/docs/build/snapshots.md +++ b/website/docs/docs/build/snapshots.md @@ -587,6 +587,16 @@ Snapshot results: + + +### Define column names in snapshot table + +In dbt Cloud, there's a config which will now allow you to define the names of the columns that are created in the [snapshot table](/docs/build/snapshots#snapshot-meta-fields). Users can now set this config to use different names. + +If a user renames the columns for a snapshot without updating an existing table, they will get an error. The recommendation is to use these settings for new snapshots, or to arrange to update your existing tables prior to committing a column name change. + + + ## FAQs From ea5ac0e599434d50ba54eb8c718c99e1c3fbf615 Mon Sep 17 00:00:00 2001 From: nataliefiann <120089939+nataliefiann@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:17:14 +0100 Subject: [PATCH 2/4] Update website/docs/docs/build/snapshots.md --- website/docs/docs/build/snapshots.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/snapshots.md b/website/docs/docs/build/snapshots.md index 928727cdb61..4167ed13d67 100644 --- a/website/docs/docs/build/snapshots.md +++ b/website/docs/docs/build/snapshots.md @@ -591,7 +591,7 @@ Snapshot results: ### Define column names in snapshot table -In dbt Cloud, there's a config which will now allow you to define the names of the columns that are created in the [snapshot table](/docs/build/snapshots#snapshot-meta-fields). Users can now set this config to use different names. +In [Versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can now define the names of the columns created in the [snapshot table](/docs/build/snapshots#snapshot-meta-fields) using custom configurations. The original columns were named `dbt_valid_to`, `dbt_valid_from`, `dbt_scd_id`, and `dbt_updated_at`, however, users can now customize these names as needed. If a user renames the columns for a snapshot without updating an existing table, they will get an error. The recommendation is to use these settings for new snapshots, or to arrange to update your existing tables prior to committing a column name change. From d2e4fe7ffedd9f37fc6f1258f0f3d9bf204e56f8 Mon Sep 17 00:00:00 2001 From: nataliefiann <120089939+nataliefiann@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:17:38 +0100 Subject: [PATCH 3/4] Update website/docs/docs/build/snapshots.md Co-authored-by: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> --- website/docs/docs/build/snapshots.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/snapshots.md b/website/docs/docs/build/snapshots.md index 4167ed13d67..800a1ef3337 100644 --- a/website/docs/docs/build/snapshots.md +++ b/website/docs/docs/build/snapshots.md @@ -593,7 +593,7 @@ Snapshot results: In [Versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can now define the names of the columns created in the [snapshot table](/docs/build/snapshots#snapshot-meta-fields) using custom configurations. The original columns were named `dbt_valid_to`, `dbt_valid_from`, `dbt_scd_id`, and `dbt_updated_at`, however, users can now customize these names as needed. -If a user renames the columns for a snapshot without updating an existing table, they will get an error. The recommendation is to use these settings for new snapshots, or to arrange to update your existing tables prior to committing a column name change. +Note, if you rename snapshot columns without updating the existing table, it will cause an error. It's recommended to use this feature for new snapshots or update your existing tables before committing a column name change. From ab926601fe117186438ec7fd64f317603c95aee9 Mon Sep 17 00:00:00 2001 From: nataliefiann <120089939+nataliefiann@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:21:05 +0100 Subject: [PATCH 4/4] Update website/docs/docs/build/snapshots.md --- website/docs/docs/build/snapshots.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/snapshots.md b/website/docs/docs/build/snapshots.md index 800a1ef3337..d01576fdc11 100644 --- a/website/docs/docs/build/snapshots.md +++ b/website/docs/docs/build/snapshots.md @@ -594,7 +594,7 @@ Snapshot results: In [Versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#versionless), you can now define the names of the columns created in the [snapshot table](/docs/build/snapshots#snapshot-meta-fields) using custom configurations. The original columns were named `dbt_valid_to`, `dbt_valid_from`, `dbt_scd_id`, and `dbt_updated_at`, however, users can now customize these names as needed. Note, if you rename snapshot columns without updating the existing table, it will cause an error. It's recommended to use this feature for new snapshots or update your existing tables before committing a column name change. - +This feature will also be available in the upcoming 1.9 release.