cube-js/cube · error

Unsupported export bucket type.

Error message

Unsupported export bucket type.

What it means

Thrown in SnowflakeDriver.exportOptionsClause (via unloadSql) when the configured exportBucket has a bucketType other than 'gcsbucket', 's3', or 'azure' — i.e. the export bucket configuration carries an unsupported or misspelled bucket type, so no COPY INTO <location> storage options can be built.

Source

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

        optionsToExport.CREDENTIALS = `(AWS_KEY_ID = '${conf.keyId}' AWS_SECRET_KEY = '${conf.secretKey}')`;
      }
    } else if (bucketType === 'gcs') {
      optionsToExport.STORAGE_INTEGRATION = (
        <SnowflakeDriverExportGCS> this.config.exportBucket
      ).integrationName;
    } else if (bucketType === 'azure') {
      // @see https://docs.snowflake.com/en/sql-reference/sql/copy-into-location
      // @see https://docs.snowflake.com/en/user-guide/data-unload-azure
      const conf = <SnowflakeDriverExportAzure> this.config.exportBucket;

      // Storage integration export flow takes precedence over direct auth if it is defined
      if (conf.integrationName) {
        optionsToExport.STORAGE_INTEGRATION = conf.integrationName;
      } else {
        optionsToExport.CREDENTIALS = `(AZURE_SAS_TOKEN = '${conf.sasToken}')`;
      }
    } else {
      throw new Error('Unsupported export bucket type.');
    }
    const clause = Object.entries(optionsToExport)
      .map(([key, value]) => `${key} = ${value}`)
      .join(' ');
    return clause;
  }

  /**
   * Returns an array of signed URLs of the unloaded csv files.
   */
  private async getCsvFiles(tableName: string): Promise<string[]> {
    const { bucketType } =
      <SnowflakeDriverExportBucket> this.config.exportBucket;

    if (bucketType === 's3') {
      const { keyId, secretKey, region } = <SnowflakeDriverExportAWS> this.config.exportBucket;

      const { bucketName, path } = this.parseBucketUrl(this.config.exportBucket!.bucketName);

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Set exportBucket.bucketType to one of the supported values: 's3', 'gcs', or 'azure'.
  2. Check for typos in the driver configuration (e.g. 's3bucket' or 'gcsbucket' are not accepted here).
  3. If unloading is not required, remove the exportBucket option instead of supplying a partial configuration.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts:740 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/a93b8fdcb3296857. Report an issue: GitHub.