cube-js/cube · error

Unsupported configuration exportBucket, some configuration k

Error message

Unsupported configuration exportBucket, some configuration keys are empty: ${keysToValidate.join(',')}

What it means

Thrown from getExportBucket during SnowflakeDriver construction when an export bucket is configured (CUBEJS_DB_EXPORT_BUCKET_TYPE is set) but required keys of the resulting exportBucket config resolve to undefined. The empty keys are collected and joined into the message, so the names after the colon list exactly which configuration values are missing.

Source

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

  ): SnowflakeDriverExportBucket | undefined {
    const bucketType = getEnv('dbExportBucketType', {
      dataSource,
      preAggregations,
      supported: SUPPORTED_BUCKET_TYPES,
    });
    if (bucketType) {
      const exportBucket = this.createExportBucket(
        dataSource,
        bucketType,
        preAggregations,
      );

      const emptyKeys = Object.keys(exportBucket)
        .filter((key: string) => exportBucket[<keyof SnowflakeDriverExportBucket>key] === undefined);
      const keysToValidate = this.getRequiredExportBucketKeys(exportBucket, emptyKeys);

      if (keysToValidate.length) {
        throw new Error(
          `Unsupported configuration exportBucket, some configuration keys are empty: ${keysToValidate.join(',')}`
        );
      }

      return exportBucket;
    }

    return undefined;
  }

  private async readOAuthToken() {
    const tokenPath = this.config.oauthTokenPath || '/snowflake/session/token';

    try {
      await fs.access(tokenPath);
    } catch (error) {
      throw new Error(`File ${tokenPath} provided by CUBEJS_DB_SNOWFLAKE_OAUTH_TOKEN_PATH does not exist.`);
    }

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Check the comma-separated key names in the message and set the corresponding CUBEJS_DB_EXPORT_BUCKET_* environment variables (e.g. name, region, credentials)
  2. For S3-style buckets provide CUBEJS_DB_EXPORT_BUCKET_NAME, CUBEJS_DB_EXPORT_BUCKET_AWS_KEY, CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET, and CUBEJS_DB_EXPORT_BUCKET_REGION
  3. For GCS-style buckets provide CUBEJS_DB_EXPORT_BUCKET_NAME and CUBEJS_DB_EXPORT_BUCKET_GCS_KEY
  4. Verify the values are not empty strings and that getEnv resolves them for the same dataSource/preAggregations context
Defensive patterns

Strategy: validation

When it happens

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