{"record":{"id":"fccb7f9982b7e3d4","repo":"cube-js/cube","slug":"export-bucket-is-not-configured-fccb7f","errorCode":null,"errorMessage":"Export bucket is not configured.","messagePattern":"Export bucket is not configured\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts","lineNumber":544,"sourceCode":"  }\n\n  /**\n   * Determines whether export bucket feature is configured or not.\n   */\n  public async isUnloadSupported() {\n    return this.config.exportBucket !== undefined;\n  }\n\n  /**\n   * Returns to the Cubestore an object with links to unloaded to the\n   * export bucket data.\n   */\n  public async unload(\n    tableName: string,\n    options: UnloadOptions,\n  ): Promise<DownloadTableCSVData> {\n    if (!this.config.exportBucket) {\n      throw new Error('Export bucket is not configured.');\n    }\n    if (!SUPPORTED_BUCKET_TYPES.includes(this.config.exportBucket.bucketType as string)) {\n      throw new Error(`Unsupported export bucket type: ${\n        this.config.exportBucket.bucketType\n      }`);\n    }\n\n    const { types, exportedCount } = options.query\n      ? await this.unloadWithSql(tableName, options)\n      : await this.unloadWithTable(tableName, options);\n    // Snowflake doesn't produce csv files if no data is exported (no data rows)\n    // so it's important not to call getCsvFiles(), because it checks for empty files list\n    // and throws an error.\n    const csvFile = exportedCount > 0 ? await this.getCsvFiles(tableName) : [];\n\n    return {\n      exportBucketCsvEscapeSymbol: this.config.exportBucketCsvEscapeSymbol,\n      csvFile,","sourceCodeStart":526,"sourceCodeEnd":562,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts#L526-L562","documentation":"Thrown by unload when it is called to export pre-aggregation data although config.exportBucket is undefined — i.e. isUnloadSupported() would return false because no export bucket was configured for this driver instance.","triggerScenarios":"Thrown at packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts:544 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure an export bucket via CUBEJS_DB_EXPORT_BUCKET_TYPE and the related CUBEJS_DB_EXPORT_BUCKET_* variables","Check that getExportBucket returns a valid bucket at driver construction instead of undefined","Ensure external pre-aggregations are only enabled when the export bucket is actually configured"],"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"}