beekeeper-studio/beekeeper-studio · error
Please enter a default warehouse
Error message
Please enter a default warehouse
What it means
configDatabase additionally requires `server.config.snowflakeOptions.defaultWarehouse`. Snowflake sessions execute queries inside a warehouse; without one the SDK session fails, so the client rejects the connection up front with 'Please enter a default warehouse'.
Source
Thrown at apps/studio/src-commercial/backend/lib/db/clients/snowflake.ts:118
}
async disconnect(): Promise<void> {
await super.disconnect();
await this.pool.clear();
}
async defaultSchema(): Promise<string | null> {
return this._defaultSchema;
}
private async configDatabase(server: IDbConnectionServer, database: IDbConnectionDatabase): Promise<ConnectionOptions> {
if (!database.database) {
throw new Error('Please enter a default database');
}
if (!server.config.snowflakeOptions.defaultWarehouse) {
throw new Error('Please enter a default warehouse');
}
const config: ConnectionOptions = {
authenticator: 'SNOWFLAKE',
account: server.config.snowflakeOptions.accountId,
database: database.database,
warehouse: server.config.snowflakeOptions.defaultWarehouse,
};
if ([SnowflakeAuthType.MFACode, SnowflakeAuthType.MFANotif, SnowflakeAuthType.Default].includes(server.config.snowflakeOptions?.authType)) {
config.username = server.config.user;
config.password = server.config.password;
}
if ([SnowflakeAuthType.MFACode, SnowflakeAuthType.MFANotif].includes(server.config.snowflakeOptions?.authType)) {
config.authenticator = 'USERNAME_PASSWORD_MFA';
config.clientRequestMFAToken = true;
}View on GitHub (pinned to 4e3e03e322)
Solutions
- Enter a default warehouse in the Snowflake connection settings and reconnect
- Confirm the warehouse name is valid (SHOW WAREHOUSES) and the user's role has USAGE on it
- If constructing config in code, set `server.config.snowflakeOptions.defaultWarehouse` before connecting
Example fix
// before
server.config.snowflakeOptions = { accountId: 'acme' };
// after
server.config.snowflakeOptions = { accountId: 'acme', defaultWarehouse: 'COMPUTE_WH' }; Defensive patterns
Strategy: validation
Validate before calling
function hasWarehouse(server) {
return Boolean(server?.config?.snowflakeOptions?.defaultWarehouse);
}
if (!hasWarehouse(server)) throw new Error('Configure a default warehouse for this Snowflake connection'); Type guard
function hasSnowflakeWarehouse(server): server is IDbConnectionServer & { config: { snowflakeOptions: { defaultWarehouse: string } } } {
return typeof server?.config?.snowflakeOptions?.defaultWarehouse === 'string'
&& server.config.snowflakeOptions.defaultWarehouse !== '';
} Try / catch
try {
await client.config(server, db);
} catch (e) {
if (e.message === 'Please enter a default warehouse') {
ui.openConnectionForm({ focus: 'defaultWarehouse' });
return;
}
throw e;
} Prevention
- Mark warehouse as a required field in the Snowflake connection form
- Audit saved Snowflake connections (migrations/templates) for missing defaultWarehouse
- Standardize on a known warehouse name in automation configs
When it happens
Trigger: Calling config/connect where `server.config.snowflakeOptions.defaultWarehouse` is falsy — the Snowflake options form was submitted without choosing a warehouse, or a hand-built server config lacks snowflakeOptions.defaultWarehouse.
Common situations: User fills in account/database/user but misses the warehouse field in the connection form; older saved connections predate the warehouse requirement; scripts copying a server config template omit the warehouse.
Related errors
- Please enter a default database
- DynamoDB IAM key authentication requires a non-empty Secret
- DynamoDB connection requires either an authentication type (
- Write action(s) not allowed in Read-Only Mode.
- Sync URL can only be used with local files
AI-assisted analysis of beekeeper-studio/beekeeper-studio@4e3e03e322 (2026-08-31).
Data as JSON: /api/errors/b8d31fdb2252d5c4.
Report an issue: GitHub.