cube-js/cube · error

Data blending drillDown query is not currently supported

Error message

Data blending drillDown query is not currently supported

What it means

ResultSet.drillDown() supports regular queries only; for data-blending queries (multiple queries joined on shared dimensions, queryType 'blending') there is no single source query to drill into, so the method throws this error. Like the compareDateRange case, it is an explicit unsupported-feature guard.

Source

Thrown at packages/cubejs-client-core/src/ResultSet.ts:205

   *      ...drillDownQuery,
   *      limit: 30,
   *      order: {
   *        'Orders.ts': 'desc'
   *      }
   *    },
   *    {
   *      skip: !drillDownQuery
   *    }
   *  );
   * ```
   * @returns Drill down query
   */
  public drillDown(drillDownLocator: DrillDownLocator, pivotConfig?: PivotConfig): Query | null {
    if (this.queryType === QUERY_TYPE.COMPARE_DATE_RANGE_QUERY) {
      throw new Error('compareDateRange drillDown query is not currently supported');
    }
    if (this.queryType === QUERY_TYPE.BLENDING_QUERY) {
      throw new Error('Data blending drillDown query is not currently supported');
    }

    const { query } = this.loadResponses[0];
    const xValues = drillDownLocator?.xValues ?? [];
    const yValues = drillDownLocator?.yValues ?? [];
    const normalizedPivotConfig = this.normalizePivotConfig(pivotConfig);

    const values: string[][] = [];
    normalizedPivotConfig?.x.forEach((member, currentIndex) => values.push([member, xValues[currentIndex]]));
    normalizedPivotConfig?.y.forEach((member, currentIndex) => values.push([member, yValues[currentIndex]]));

    const { filters: parentFilters = [], segments = [] } = this.query();
    const { measures, timeDimensions: timeDimensionsAnnotation } = this.loadResponses[0].annotation;
    let [, measureName] = values.find(([member]) => member === 'measures') || [];

    if (measureName === undefined) {
      [measureName] = Object.keys(measures);
    }

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Skip drill-down for blended-result charts (guard on resultSet.queryType === 'blending' before calling drillDown).
  2. Execute the blended queries as separate regular queries and enable drillDown on each individual ResultSet.
  3. Build the drill-down query manually for the specific blended member: pick the source query for that measure and add filters for the clicked x/y values.
  4. Check Cube client releases for blending drillDown support before adding it back.

Example fix

// before
onClick={({ xValues, yValues }) => {
  const q = resultSet.drillDown({ xValues, yValues }); // throws for blended query
}}

// after
onClick={({ xValues, yValues }) => {
  if (resultSet.queryType === 'blending') return; // drill-down unsupported
  const q = resultSet.drillDown({ xValues, yValues });
}}
Defensive patterns

Strategy: validation

Validate before calling

function canDrillDown(resultSet) {
  const unsupported = ['compareDateRange', 'blending'];
  return resultSet && !unsupported.includes(resultSet.queryType);
}

// usage
onClick={({ xValues, yValues }) => {
  if (canDrillDown(resultSet)) { const q = resultSet.drillDown({ xValues, yValues }); }
}}

Type guard

function isDrillable(rs: ResultSet): boolean {
  return rs.queryType !== 'compareDateRange' && rs.queryType !== 'blending';
}

Try / catch

let drillQuery = null;
try {
  drillQuery = resultSet.drillDown({ xValues, yValues }, pivotConfig);
} catch (e) {
  if (/drillDown query is not currently supported/.test(e.message)) {
    drillQuery = null; // drill-down unsupported for blended queries
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling resultSet.drillDown(locator, pivotConfig) on a ResultSet produced from a blended query — created by passing an array of queries to load()/useCubeQuery (e.g. cubeApi.load([queryA, queryB])) — where the server responds with queryType 'blending'.

Common situations: A chart built from blended queries (measures from different cubes on a shared axis) with a generic drill-down click handler; an app that added data blending to an existing chart but kept the drillDown wiring; frameworks that always call drillDown on cell click.

Related errors


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