diff --git a/docs/pages/product/configuration/data-sources/snowflake.mdx b/docs/pages/product/configuration/data-sources/snowflake.mdx index 47c716af545d5..d0156397ccb36 100644 --- a/docs/pages/product/configuration/data-sources/snowflake.mdx +++ b/docs/pages/product/configuration/data-sources/snowflake.mdx @@ -12,6 +12,12 @@ redirect_from: - [The region][snowflake-docs-regions] for the [Snowflake][snowflake] warehouse - The username/password for the [Snowflake][snowflake] account +## Snowflake quoted identifiers + +Due to an issue in snowflakes opinion about quoted identifers we set a session value to override +snowflake defaults for users that have set an account value for: QUOTED_IDENTIFIERS_IGNORE_CASE +you can learn more about this here: https://docs.snowflake.com/en/sql-reference/identifiers-syntax#double-quoted-identifiers + ## Setup diff --git a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts index ccf19191fa980..7ec0f2e900e65 100644 --- a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts +++ b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts @@ -450,7 +450,14 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface { await this.execute(connection, 'ALTER SESSION SET TIMEZONE = \'UTC\'', [], false); await this.execute(connection, `ALTER SESSION SET STATEMENT_TIMEOUT_IN_SECONDS = ${this.config.executionTimeout}`, [], false); - + /** + * Because snowflake has an opinion about the shape of data returns over the api. + * we have to set this value to false in order for our schema requests to succeed. + * + * You can learn more here. + * https://docs.snowflake.com/en/sql-reference/identifiers-syntax#double-quoted-identifiers + */ + await this.execute(connection, 'ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = FALSE', [], false); return connection; } catch (e) { this.connection = null;