{"record":{"id":"7551db0aea450c77","repo":"cube-js/cube","slug":"the-keybydatasource-cubejs-db-export-bucket-typ","errorCode":null,"errorMessage":"The ${keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource)} must be one of the [${supported.join(', ')}].","messagePattern":"The (.+?) must be one of the \\[(.+?)\\]\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-backend-shared/src/env.ts","lineNumber":873,"sourceCode":"  /**\n   * Export bucket storage type.\n   */\n  dbExportBucketType: ({\n    supported,\n    dataSource,\n    preAggregations,\n  }: {\n    supported: ('s3' | 'gcp' | 'azure')[],\n    dataSource: string,\n    preAggregations?: boolean,\n  }) => {\n    const val = get(keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource, preAggregations)).asString();\n    if (\n      val &&\n      supported &&\n      supported.indexOf(<'s3' | 'gcp' | 'azure'>val) === -1\n    ) {\n      throw new TypeError(\n        `The ${\n          keyByDataSource('CUBEJS_DB_EXPORT_BUCKET_TYPE', dataSource)\n        } must be one of the [${supported.join(', ')}].`\n      );\n    }\n    return val;\n  },\n\n  /**\n   * Export bucket storage URI.\n   */\n  dbExportBucket: ({\n    dataSource,\n    preAggregations,\n  }: DataSourceOpts) => (\n    get(keyByDataSource('CUBEJS_DB_EXPORT_BUCKET', dataSource, preAggregations)).asString()\n  ),\n","sourceCodeStart":855,"sourceCodeEnd":891,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-backend-shared/src/env.ts#L855-L891","documentation":"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.","triggerScenarios":"Thrown at packages/cubejs-backend-shared/src/env.ts:873 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}