{"record":{"id":"1ff783e5b6aa3918","repo":"cube-js/cube","slug":"unsupported-export-bucket-type-this-config-buck-1ff783","errorCode":null,"errorMessage":"Unsupported export bucket type: ${this.config.bucketType}","messagePattern":"Unsupported export bucket type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-prestodb-driver/src/PrestoDriver.ts","lineNumber":378,"sourceCode":"  public async createSchemaIfNotExists(schemaName: string) {\n    await this.query(\n      `CREATE SCHEMA IF NOT EXISTS ${this.config.catalog}.${schemaName}`,\n      [],\n    );\n  }\n\n  // Export bucket methods\n  public async isUnloadSupported() {\n    return this.config.exportBucket !== undefined;\n  }\n\n  public async unload(tableName: string, options: UnloadOptions) {\n    if (!this.config.exportBucket) {\n      throw new Error('Export bucket is not configured.');\n    }\n\n    if (!SUPPORTED_BUCKET_TYPES.includes(this.config.bucketType as string)) {\n      throw new Error(`Unsupported export bucket type: ${this.config.bucketType}`);\n    }\n\n    const types = options.query\n      ? await this.unloadWithSql(tableName, options.query.sql, options.query.params)\n      : await this.unloadWithTable(tableName);\n\n    const csvFile = await this.getCsvFiles(tableName);\n\n    return {\n      exportBucketCsvEscapeSymbol: this.config.exportBucketCsvEscapeSymbol,\n      csvFile,\n      types,\n      csvNoHeader: true,\n    };\n  }\n\n  private splitTableFullName(tableFullName: string) {\n    const [schema, tableName] = tableFullName.split('.');","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-prestodb-driver/src/PrestoDriver.ts#L360-L396","documentation":"When an export bucket is configured, PrestoDriver.unload validates that the bucketType is one of SUPPORTED_BUCKET_TYPES (e.g. s3/gcs/azure). An unsupported bucketType string throws this error before any export is attempted.","triggerScenarios":"Setting PrestoDriver exportBucket.bucketType to a typo'd or unsupported value (e.g. 's', 'aws', 'blob') and then triggering unload via the query/download pipeline.","commonSituations":"Typo in bucket type config; copying config from another driver that supports a different bucket type set; newer/older driver versions where the supported list differs.","solutions":["Set bucketType to one of the supported values (check SUPPORTED_BUCKET_TYPES: s3, gcs, azure)","Fix the typo in the exportBucket configuration","Upgrade the driver package if your storage backend's bucket type is supported only in newer versions"],"exampleFix":"// before\nexportBucket: { bucketType: 'aws', bucket: 'my-bucket' }\n// after\nexportBucket: { bucketType: 's3', bucket: 'my-bucket', region: 'us-east-1' }","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['s3', 'gcs', 'azure'];\nif (!SUPPORTED.includes(driver.config?.exportBucket?.bucketType)) {\n  throw new Error(`bucketType must be one of ${SUPPORTED.join(', ')}`);\n}","typeGuard":"const isSupportedBucketType = (t) => typeof t === 'string' && ['s3','gcs','azure'].includes(t.toLowerCase());","tryCatchPattern":"try {\n  await driver.unload(tableName, options);\n} catch (e) {\n  if (String(e.message).startsWith('Unsupported export bucket type')) {\n    console.error(`Fix exportBucket.bucketType; got: ${e.message}`);\n  }\n  throw e;\n}","preventionTips":["Copy bucketType values exactly from driver docs (lowercase)","Validate exportBucket config at startup, not at export time","Pin driver versions so supported bucket types are known"],"tags":["prestodb","export-bucket","configuration","validation"],"backgroundTag":"unsupported-bucket-type","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}