cube-js/cube · error · TypeError
The ${keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSo
Error message
The ${keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource)} must be one of the [${supported.join(', ')}]. What it means
Env validation in env.ts dbExportBucketType: CUBEJS_DB_EXPORT_BUCKET_TYPE (optionally suffixed per data source) is set to a value outside the driver's supported list of s3, gcp, azure. It fires when a driver that only supports some export bucket types receives an unsupported one — a startup/driver-configuration error, not a runtime query error.
Source
Thrown at packages/cubejs-backend-shared/src/env.ts:873
/**
* Export bucket storage type.
*/
dbExportBucketType: ({
supported,
dataSource,
preAggregations,
}: {
supported: ('s3' | 'gcp' | 'azure')[],
dataSource: string,
preAggregations?: boolean,
}) => {
const val = get(keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource, preAggregations)).asString();
if (
val &&
supported &&
supported.indexOf(<'s3' | 'gcp' | 'azure'>val) === -1
) {
throw new TypeError(
`The ${
keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource)
} must be one of the [${supported.join(', ')}].`
);
}
return val;
},
/**
* Export bucket storage URI.
*/
dbExportBucket: ({
dataSource,
preAggregations,
}: DataSourceOpts) => (
get(keyByDataSource('CUBEJS_DB_EXPORT_BUCKET', dataSource, preAggregations)).asString()
),
View on GitHub (pinned to 7d981676b3)
Solutions
- Set CUBEJS_DB_EXPORT_BUCKET_TYPE to one of the supported values listed in the error (s3, gcp, azure).
- Check which export bucket types your database driver actually supports.
- Use the data-source-suffixed variable (e.g. CUBEJS_DB_EXPORT_BUCKET_TYPE_mydb) only if you intend per-datasource configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-backend-shared/src/env.ts:873 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/7551db0aea450c77.
Report an issue: GitHub.