Skip to content

Commit caa3340

Browse files
authored
Merge pull request #262 from bessey/patch-1
Snowflake: automatic clustering + SSO updates
2 parents 0fdf024 + 5a31d17 commit caa3340

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

website/docs/docs/guides/migration-guide/upgrading-to-0-18-0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ can override schema test definitions
7575

7676
**Snowflake**
7777
- `query_tag` in [profile](snowflake-profile), [model config](snowflake-configs#query-tags)
78+
- automatic SSO [session caching](snowflake-configs#sso-authentication) support
7879

7980
**BigQuery**
8081
- [`impersonate_service_account`](https://docs.getdbt.com/reference/warehouse-profiles/bigquery-profile#service-account-impersonation)

website/docs/reference/resource-configs/snowflake-configs.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ select ...
8282
8383
```
8484

85-
**Note:** query tags are set at the _session_ level. At the start of each model
86-
materialization, if the model has a custom `query_tag`
85+
**Note:** query tags are set at the _session_ level. At the start of each model
86+
materialization, if the model has a custom `query_tag`
8787
configured, dbt will run `alter session set query_tag` to set the new value.
8888
At the end of the materialization, dbt will run another `alter` statement to reset
8989
the tag to its default value. As such, build failures midway through a materialization may result in subsequent
@@ -161,7 +161,9 @@ create or replace table my_database.my_schema.my_table as (
161161

162162
### Automatic clustering
163163

164-
Automatic clustering is a preview feature in Snowflake (at the time of this writing) and as such, some accounts may have it turned on while others may not. You can use the `automatic_clustering` config to control whether or not automatic clustering is enabled for dbt models. When `automatic_clustering` is set to `true`, dbt will run an `alter table <table name> resume recluster` query after building the target table. This configuration is only required for Snowflake accounts which do not have automatic clustering enabled. For more information, consult the [Snowflake documentation on Manual Reclustering](https://docs.snowflake.net/manuals/user-guide/tables-clustering-manual.html#switching-from-manual-reclustering-to-automatic-clustering).
164+
Automatic clustering is [enabled by default in Snowflake today](https://docs.snowflake.com/en/user-guide/tables-auto-reclustering.html), no action is needed to make use of it. Though there is an `automatic_clustering` config, it has no effect except for accounts with (deprecated) manual clustering enabled.
165+
166+
If [manual clustering is still enabled for your account](https://docs.snowflake.com/en/user-guide/tables-clustering-manual.html), you can use the `automatic_clustering` config to control whether or not automatic clustering is enabled for dbt models. When `automatic_clustering` is set to `true`, dbt will run an `alter table <table name> resume recluster` query after building the target table.
165167

166168
The `automatic_clustering` config can be specified in the `dbt_project.yml` file, or in a model `config()` block.
167169

website/docs/reference/warehouse-profiles/snowflake-profile.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ my-snowflake-db:
6868
6969
To use SSO authentication for Snowflake, omit a `password` and instead supply an `authenticator` config to your target. `authenticator` can be one of 'externalbrowser' or a valid Okta URL.
7070

71-
**Note**: By default, every connection that dbt opens will require you to re-authenticate in a browser. Contact your Snowflake support rep and inquire about turning on the "id token cache" for your account as described [here](https://github.com/snowflakedb/snowflake-connector-python/issues/140#issuecomment-447028785).
71+
<Changelog>New in v0.18.0</Changelog>
72+
73+
**Note**: By default, every connection that dbt opens will require you to re-authenticate in a browser. The Snowflake connector package supports caching your session token, but it [currently only supports Windows and Mac OS](https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#optional-using-connection-caching-to-minimize-the-number-of-prompts-for-authentication). See [the Snowflake docs](https://docs.snowflake.com/en/sql-reference/parameters.html#label-allow-id-token) for how to enable this feature in your account.
7274

7375
<File name='~/.dbt/profiles.yml'>
7476

0 commit comments

Comments
 (0)