cube-js/cube · error

Unsupported export bucket type: ${this.config.exportBucket.b

Error message

Unsupported export bucket type: ${this.config.exportBucket.bucketType}

What it means

Thrown by unload when config.exportBucket.bucketType is set but is not one of the SUPPORTED_BUCKET_TYPES accepted by the Snowflake driver — a guard against a mis-typed CUBEJS_DB_EXPORT_BUCKET_TYPE value that slipped past configuration validation.

Source

Thrown at packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts:547

   * Determines whether export bucket feature is configured or not.
   */
  public async isUnloadSupported() {
    return this.config.exportBucket !== undefined;
  }

  /**
   * Returns to the Cubestore an object with links to unloaded to the
   * export bucket data.
   */
  public async unload(
    tableName: string,
    options: UnloadOptions,
  ): Promise<DownloadTableCSVData> {
    if (!this.config.exportBucket) {
      throw new Error('Export bucket is not configured.');
    }
    if (!SUPPORTED_BUCKET_TYPES.includes(this.config.exportBucket.bucketType as string)) {
      throw new Error(`Unsupported export bucket type: ${
        this.config.exportBucket.bucketType
      }`);
    }

    const { types, exportedCount } = options.query
      ? await this.unloadWithSql(tableName, options)
      : await this.unloadWithTable(tableName, options);
    // Snowflake doesn't produce csv files if no data is exported (no data rows)
    // so it's important not to call getCsvFiles(), because it checks for empty files list
    // and throws an error.
    const csvFile = exportedCount > 0 ? await this.getCsvFiles(tableName) : [];

    return {
      exportBucketCsvEscapeSymbol: this.config.exportBucketCsvEscapeSymbol,
      csvFile,
      types,
      csvNoHeader: true,
    };

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Set CUBEJS_DB_EXPORT_BUCKET_TYPE to a supported value (s3 or gcs)
  2. Check for typos or surrounding whitespace in the environment variable
  3. Upgrade the driver package if a newer bucket type is expected to be supported
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts:547 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/1a7adb3f74b48649. Report an issue: GitHub.