cube-js/cube · error

Unsupported export bucket type: ${bucketType}

Error message

Unsupported export bucket type: ${bucketType}

What it means

Thrown in SnowflakeDriver.getCsvFiles (via csvFile) after an unload when the configured exportBucket.bucketType does not match 'gcsbucket', 's3', or 'azure'. By this point data was exported, but the driver cannot pick the cloud-storage client (GCS/S3/Azure) needed to extract the CSV files, so it aborts.

Source

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

      return this.extractFilesFromGCS({ credentials }, bucketName, exportPrefix);
    } else if (bucketType === 'azure') {
      const { azureKey, sasToken, clientId, tenantId, tokenFilePath } = (
        <SnowflakeDriverExportAzure> this.config.exportBucket
      );

      const { bucketName, path } = this.parseBucketUrl(this.config.exportBucket!.bucketName);
      const pathArr = path.split('/');
      const azureBucketPath = `${bucketName}/${pathArr[0]}`;

      const exportPrefix = pathArr.length > 1 ? `${pathArr.slice(1).join('/')}/${tableName}` : tableName;

      return this.extractFilesFromAzure(
        { azureKey, sasToken, clientId, tenantId, tokenFilePath },
        azureBucketPath,
        exportPrefix,
      );
    } else {
      throw new Error(`Unsupported export bucket type: ${bucketType}`);
    }
  }

  /**
   * Executes a query and returns either query result memory data or
   * query result stream, depending on options.
   */
  public downloadQueryResults(
    query: string,
    values: unknown[],
    options: DownloadQueryResultsOptions,
  ): CancelablePromise<DownloadQueryResultsResult> {
    if (!options.streamImport) {
      return this.memory(query, values);
    } else {
      return this.stream(query, values, options);
    }
  }

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Correct exportBucket.bucketType to 's3', 'gcs', or 'azure' in the driver config.
  2. Supply the credentials required for the chosen bucket type (AWS keys, GCS key file, or Azure key/SAS/service-principal settings).
  3. Verify the same bucket type was used for the unload step that produced the files.
Defensive patterns

Strategy: validation

When it happens

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