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
- Read the accompanying data.errorMessage for the actual Dremio failure reason and fix the query or dataset accordingly
- Validate the SQL and referenced dataset paths against Dremio directly (run the query in the Dremio UI)
- Check source permissions for the user whose credentials/token the driver uses
- Check Dremio job profiles (Jobs UI) for detailed failure diagnostics
- 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
- Run queries in the Dremio UI first to validate SQL and dataset paths
- Grant the driver's user/token access to all referenced sources
- Keep dataset paths in sync with Dremio schema changes
- Monitor Dremio job failures and set alerts on FAILED job states
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
- Job ${jobId} has been canceled
- DremioQuery job timeout reached ${this.config.pollTimeout}ms
- You cannot change security context via __user from ${session
- Incorrect user name "${user}" or password
- ${queryExecution.QueryExecution?.Status?.StateChangeReason}
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/49a49122fe425b51.
Report an issue: GitHub.