{"record":{"id":"f4696656707f2bdc","repo":"cube-js/cube","slug":"unsupported-export-bucket-type-supported-suppo-f46966","errorCode":null,"errorMessage":"Unsupported EXPORT_BUCKET_TYPE, supported: ${supportedBucketTypes.join(',')}","messagePattern":"Unsupported EXPORT_BUCKET_TYPE, supported: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-redshift-driver/src/RedshiftDriver.ts","lineNumber":363,"sourceCode":"      bucketType: getEnv('dbExportBucketType', {\n        supported: supportedBucketTypes,\n        dataSource,\n        preAggregations,\n      }),\n      bucketName: getEnv('dbExportBucket', { dataSource, preAggregations }),\n      region: getEnv('dbExportBucketAwsRegion', { dataSource, preAggregations }),\n    };\n\n    const exportBucket: Partial<RedshiftDriverExportAWS> = {\n      ...requiredExportBucket,\n      keyId: getEnv('dbExportBucketAwsKey', { dataSource, preAggregations }),\n      secretKey: getEnv('dbExportBucketAwsSecret', { dataSource, preAggregations }),\n      unloadArn: getEnv('redshiftUnloadArn', { dataSource, preAggregations }),\n    };\n\n    if (exportBucket.bucketType) {\n      if (!supportedBucketTypes.includes(exportBucket.bucketType)) {\n        throw new Error(\n          `Unsupported EXPORT_BUCKET_TYPE, supported: ${supportedBucketTypes.join(',')}`\n        );\n      }\n\n      // Make sure the required keys are set\n      const emptyRequiredKeys = Object.keys(requiredExportBucket)\n        .filter((key: string) => requiredExportBucket[<keyof RedshiftDriverExportRequiredAWS>key] === undefined);\n      if (emptyRequiredKeys.length) {\n        throw new Error(\n          `Unsupported configuration exportBucket, some configuration keys are empty: ${emptyRequiredKeys.join(',')}`\n        );\n      }\n      // If unload ARN is not set, secret and key id must be set for Redshift\n      if (!exportBucket.unloadArn) {\n        // Make sure the required keys are set\n        const emptySecretKeys = Object.keys(exportBucket)\n          .filter((key: string) => key !== 'unloadArn')\n          .filter((key: string) => exportBucket[<keyof RedshiftDriverExportAWS>key] === undefined);","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-redshift-driver/src/RedshiftDriver.ts#L345-L381","documentation":"The exportBucket configuration's bucketType must be one of the supported S3 export types for Redshift UNLOAD-based exports. If CUBEJS_EXPORT_BUCKET_TYPE (or the config value) is set to something unsupported, the driver throws immediately when building its initial configuration.","triggerScenarios":"getExportBucket (invoked from getInitialConfiguration) sees exportBucket.bucketType set to a value not in supportedBucketTypes — e.g. a typo like 's3-gcp' or 'S3' instead of 's3'.","commonSituations":"Typo in CUBEJS_EXPORT_BUCKET_TYPE env var; copying exportBucket config from another driver (e.g. BigQuery/Snowflake) whose bucket types differ from Redshift's.","solutions":["Set CUBEJS_EXPORT_BUCKET_TYPE to a supported value for the Redshift driver (e.g. 's3')","Check the driver source for the supportedBucketTypes list and match it exactly (lowercase)","Remove the exportBucket config if UNLOAD-based CSV export is not needed"],"exampleFix":"// before\nCUBEJS_EXPORT_BUCKET_TYPE=gcs\n// after\nCUBEJS_EXPORT_BUCKET_TYPE=s3","handlingStrategy":"validation","validationCode":"const supported = ['s3'];\nconst type = process.env.CUBEJS_EXPORT_BUCKET_TYPE;\nif (type && !supported.includes(type)) {\n  throw new Error(`CUBEJS_EXPORT_BUCKET_TYPE must be one of: ${supported.join(',')}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy bucket config only between the same driver types","Validate export env vars at app startup with a config lint script","Keep the bucketType value lowercase exactly as documented"],"tags":["redshift","configuration","export-bucket"],"backgroundTag":"invalid-config-value","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}