cube-js/cube · error
Unsupported EXPORT_BUCKET_TYPE, supported: ${SUPPORTED_BUCKE
Error message
Unsupported EXPORT_BUCKET_TYPE, supported: ${SUPPORTED_BUCKET_TYPES.join(',')} What it means
The Snowflake driver's createExportBucket supports a fixed set of bucket types (SUPPORTED_BUCKET_TYPES, e.g. s3, gcs, azure). If after checking all known types none matched, the configured EXPORT_BUCKET_TYPE is unknown and the driver throws listing the supported values. This is a terminal validation of the bucket type discriminator.
Source
Thrown at packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts:338
// These 3 options make sense in case you want to authorize to Azure from
// application running in the k8s environment.
const clientId = getEnv('dbExportBucketAzureClientId', { dataSource, preAggregations });
const tenantId = getEnv('dbExportBucketAzureTenantId', { dataSource, preAggregations });
const tokenFilePath = getEnv('dbExportBucketAzureTokenFilePAth', { dataSource, preAggregations });
return {
bucketType,
bucketName: getEnv('dbExportBucket', { dataSource, preAggregations }),
...(integrationName !== undefined && { integrationName }),
...(sasToken !== undefined && { sasToken }),
...(azureKey !== undefined && { azureKey }),
...(clientId !== undefined && { clientId }),
...(tenantId !== undefined && { tenantId }),
...(tokenFilePath !== undefined && { tokenFilePath }),
};
}
throw new Error(
`Unsupported EXPORT_BUCKET_TYPE, supported: ${SUPPORTED_BUCKET_TYPES.join(',')}`
);
}
private getRequiredExportBucketKeys(
exportBucket: SnowflakeDriverExportBucket,
emptyKeys: string[]
): string[] {
if (exportBucket.bucketType === 's3') {
const s3Config = exportBucket as SnowflakeDriverExportAWS;
if (s3Config.integrationName) {
return emptyKeys.filter(key => key !== 'keyId' && key !== 'secretKey');
}
}
return emptyKeys;
}
View on GitHub (pinned to 7d981676b3)
Solutions
- Set EXPORT_BUCKET_TYPE to one of the supported values exactly as listed in the error message (e.g. s3, gcs, azure)
- Trim whitespace and fix casing of the env value (avoid hidden spaces in .env files)
- Check the Snowflake driver docs for the currently supported bucket types for your version
- Upgrade the driver package if you need a bucket type added recently
Example fix
# before CUBEJS_DB_EXPORT_BUCKET_TYPE=S3a # after CUBEJS_DB_EXPORT_BUCKET_TYPE=s3
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = ['s3', 'gcs', 'azure']; // per driver docs/version
const t = (process.env.CUBEJS_DB_EXPORT_BUCKET_TYPE || '').trim();
if (!SUPPORTED.includes(t)) {
throw new Error(`EXPORT_BUCKET_TYPE must be one of: ${SUPPORTED.join(',')}`);
} Try / catch
try {
driver.exportBucket({ /* ... */ });
} catch (e) {
if (e.message.startsWith('Unsupported EXPORT_BUCKET_TYPE')) {
console.error('Fix CUBEJS_DB_EXPORT_BUCKET_TYPE; supported values are listed in the error');
}
throw e;
} Prevention
- Copy bucket type values exactly from the driver docs (lowercase, no whitespace)
- Validate the .env file with a linting/schema step before deploy
- Trim interpolated env values to avoid stray spaces
- Confirm bucket-type support in the installed driver version before upgrading configs
When it happens
Trigger: Setting CUBEJS_DB_EXPORT_BUCKET_TYPE to a typo'd or unsupported value such as 's3a', 'az', 'ABS', 'S3 ' (trailing space), or an entirely different cloud's value.
Common situations: Typos in env config; case sensitivity mistakes; docs from other drivers (e.g. BigQuery/Databricks bucket types) applied to Snowflake; interpolating the env var from a template with stray whitespace.
Related errors
- Unsupported export bucket type: ${this.config.bucketType}
- A user-defined contextToApiScopes function returns a wrong s
- Value "${input}" is not valid for ${envName}. ${description}
- Value "${input}" is not valid for ${envName}. Should be a po
- Value "${input}" is not valid for ${envName}. Should be lowe
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/7a23b2eacf971a57.
Report an issue: GitHub.