cube-js/cube · error

${data.errorMessage}

Error message

${data.errorMessage}

What it means

getJobStatus polls the Dremio REST API for a submitted query job. Dremio reports jobState FAILED with an errorMessage; the driver re-throws that server-side message verbatim as a generic Error, so the text is whatever Dremio reported for the failed job.

Source

Thrown at packages/cubejs-dremio-driver/driver/DremioDriver.js:179

    return axios.request({
      method,
      url: `${this.config.url}${this.config.apiVersion}${url}`,
      headers: {
        Authorization: token
      },
      data,
    });
  }

  /**
   * @protected
   */
  async getJobStatus(jobId) {
    const { data } = await this.restDremioQuery('get', `/job/${jobId}`);

    if (data.jobState === 'FAILED') {
      throw new Error(data.errorMessage);
    }

    if (data.jobState === 'CANCELED') {
      throw new Error(`Job ${jobId} has been canceled`);
    }

    if (data.jobState === 'COMPLETED') {
      return data;
    }

    return null;
  }

  /**
   * @protected
   */
  async getJobResults(jobId, limit = 500, offset = 0) {
    return this.restDremioQuery('get', `/job/${jobId}/results?offset=${offset}&limit=${limit}`);

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Read the accompanying data.errorMessage for the actual Dremio failure reason and fix the query or dataset accordingly
  2. Validate the SQL and referenced dataset paths against Dremio directly (run the query in the Dremio UI)
  3. Check source permissions for the user whose credentials/token the driver uses
  4. Check Dremio job profiles (Jobs UI) for detailed failure diagnostics
  5. Verify the source plugin (e.g. S3, Postgres) is healthy in Dremio

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// verify the dataset exists before running
const catalog = await driver.restDremioQuery('get', `/catalog/by-path/${encodedPath}`);
if (!catalog.data) throw new Error('Dataset path not found in Dremio');

Try / catch

try {
  const rows = await driver.query(sql, params);
} catch (e) {
  console.error('Dremio job failed:', e.message); // message is Dremio's errorMessage
  // inspect Dremio Jobs UI for the job profile, then fix query/permissions
}

Prevention

When it happens

Trigger: Executing a query via DremioDriver.query/job where the Dremio job enters jobState 'FAILED' — e.g. SQL syntax error, nonexistent dataset/source, permission denied on the source, out-of-memory, or source connectivity failure inside Dremio.

Common situations: Broken/renamed datasets after schema changes in Dremio; revoked user permissions on a source; reflection issues; invalid PDS path; Dremio coordinator unable to reach the executor/storage plugin.

Related errors


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