{"record":{"id":"e58ac00ae71942b6","repo":"cube-js/cube","slug":"unsupported-export-bucket-type-supported-suppo","errorCode":null,"errorMessage":"Unsupported EXPORT_BUCKET_TYPE, supported: ${SUPPORTED_BUCKET_TYPES.join(',')}","messagePattern":"Unsupported EXPORT_BUCKET_TYPE, supported: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts","lineNumber":542,"sourceCode":"    const requiredExportBucket: ClickhouseDriverExportRequiredAWS = {\n      bucketType: getEnv('dbExportBucketType', {\n        supported: SUPPORTED_BUCKET_TYPES,\n        dataSource,\n        preAggregations,\n      }),\n      bucketName: getEnv('dbExportBucket', { dataSource, preAggregations }),\n      region: getEnv('dbExportBucketAwsRegion', { dataSource, preAggregations }),\n    };\n\n    const exportBucket: ClickhouseDriverExportAWS = {\n      ...requiredExportBucket,\n      keyId: getEnv('dbExportBucketAwsKey', { dataSource, preAggregations }),\n      secretKey: getEnv('dbExportBucketAwsSecret', { dataSource, preAggregations }),\n    };\n\n    if (exportBucket.bucketType) {\n      if (!SUPPORTED_BUCKET_TYPES.includes(exportBucket.bucketType)) {\n        throw new Error(\n          `Unsupported EXPORT_BUCKET_TYPE, supported: ${SUPPORTED_BUCKET_TYPES.join(',')}`\n        );\n      }\n\n      // Make sure the required keys are set\n      const emptyRequiredKeys = Object.keys(requiredExportBucket)\n        .filter((key: string) => requiredExportBucket[<keyof ClickhouseDriverExportRequiredAWS>key] === undefined);\n      if (emptyRequiredKeys.length) {\n        throw new Error(\n          `Unsupported configuration exportBucket, some configuration keys are empty: ${emptyRequiredKeys.join(',')}`\n        );\n      }\n\n      return exportBucket;\n    }\n\n    return null;\n  }","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts#L524-L560","documentation":"The driver's exportBucket (unload to cloud storage) feature only supports a fixed set of bucket types (S3, GCS, Azure via SUPPORTED_BUCKET_TYPES). This error is thrown in getExportBucket() during driver construction when the configured EXPORT_BUCKET_TYPE is not one of the supported values.","triggerScenarios":"Setting env EXPORT_BUCKET_TYPE (per dataSource) to a value outside SUPPORTED_BUCKET_TYPES, then instantiating ClickHouseDriver; the check runs whenever exportBucket.bucketType is truthy.","commonSituations":"Typos in the env value (e.g. 's_3', 'S3' with wrong case); using a bucket type supported by other Cube drivers (e.g. Snowflake) but not ClickHouse; stale config copied from another driver's setup.","solutions":["Set EXPORT_BUCKET_TYPE to one of the values listed in the error message (e.g. s3, gcs, azure)","Fix casing/typos — match the exact supported token","If the storage backend isn't supported, switch to a supported bucket provider or remove exportBucket config and rely on non-unload query paths","Check driver docs for the currently supported EXPORT_BUCKET_TYPE values for ClickHouse"],"exampleFix":"// before\nEXPORT_BUCKET_TYPE=s3compatible\n// after\nEXPORT_BUCKET_TYPE=s3","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['s3','gcs','azure'];\nconst t = process.env.EXPORT_BUCKET_TYPE;\nif (t && !SUPPORTED.includes(t)) throw new Error(`EXPORT_BUCKET_TYPE=${t} unsupported; use one of ${SUPPORTED.join(',')}`);","typeGuard":"const isSupportedBucketType = (t: string): t is 's3'|'gcs'|'azure' => ['s3','gcs','azure'].includes(t);","tryCatchPattern":"try { const driver = new ClickHouseDriver(config); }\ncatch (e) {\n  if (String(e.message).includes('Unsupported EXPORT_BUCKET_TYPE')) throw new Error('Fix EXPORT_BUCKET_TYPE env to a supported value', { cause: e });\n  throw e;\n}","preventionTips":["Copy EXPORT_BUCKET_TYPE values verbatim from driver docs","Validate env config in CI before deployment","Only use bucket types documented for the ClickHouse driver"],"tags":["configuration","env-var","clickhouse","export-bucket"],"backgroundTag":"unsupported-config-value","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}