diff --git a/packages/cubejs-backend-shared/src/env.ts b/packages/cubejs-backend-shared/src/env.ts index 2940fabf1beeb..3d85a197b7add 100644 --- a/packages/cubejs-backend-shared/src/env.ts +++ b/packages/cubejs-backend-shared/src/env.ts @@ -1426,6 +1426,19 @@ const variables: Record any> = { ] ), + /** + * Snowflake host. + */ + snowflakeHost: ({ + dataSource + }: { + dataSource: string, + }) => ( + process.env[ + keyByDataSource('CUBEJS_DB_SNOWFLAKE_HOST', dataSource) + ] + ), + /** * Snowflake private key. */ diff --git a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts index 8a4b893ef37dc..ccf19191fa980 100644 --- a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts +++ b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts @@ -155,6 +155,7 @@ export type SnowflakeDriverExportBucket = SnowflakeDriverExportAWS | SnowflakeDr | SnowflakeDriverExportAzure; interface SnowflakeDriverOptions { + host?: string, account: string, username: string, password: string, @@ -261,6 +262,7 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface { this.config = { readOnly: false, + host: getEnv('snowflakeHost', { dataSource }), account: getEnv('snowflakeAccount', { dataSource }), region: getEnv('snowflakeRegion', { dataSource }), warehouse: getEnv('snowflakeWarehouse', { dataSource }),