cube-js/cube · error · Error
error
Error message
error
What it means
A generic rethrow in the Aurora Serverless (Data API) driver's downloadQueryResults path: an unspecified 'error' is raised when the temporary-table-based download flow fails — typically during temp table creation, staging, or the Data API batch execute of the download statements. Because the message is a bare sentinel, the actionable detail is the underlying cause: the download requires a configured default database, working temp-table DDL privileges, and reachable Data API endpoints.
Source
Thrown at packages/cubejs-mysql-aurora-serverless-driver/driver/AuroraServerlessMySqlDriver.js:136
return this.cancelCombinator(async saveCancelFn => {
await saveCancelFn(this.query(`${loadSql} LIMIT 0`, params));
await saveCancelFn(this.query(loadSql.replace(/^CREATE TABLE (\S+) AS/i, 'INSERT INTO $1'), params));
});
}
return super.loadPreAggregationIntoTable(preAggregationTableName, loadSql, params, tx);
}
async downloadQueryResults(query, values) {
if (!this.config.database) {
throw new Error('Default database should be defined to be used for temporary tables during query results downloads');
}
const tableName = crypto.randomBytes(10).toString('hex');
const transaction = this.dataApi.transaction()
.query(`CREATE TEMPORARY TABLE \`${this.config.database}\`.t_${tableName} AS ${query} LIMIT 0`, values)
.query(`DESCRIBE \`${this.config.database}\`.t_${tableName}`)
.query(`DROP TEMPORARY TABLE \`${this.config.database}\`.t_${tableName}`)
.rollback((error) => { if (error) throw new Error(error); });
const results = await transaction.commit();
const columns = results[1].records;
const types = columns.map(c => ({ name: c.Field, type: this.toGenericType(c.Type) }));
return {
rows: await this.query(query, values),
types,
};
}
toColumnValue(value, genericType) {
if (genericType === 'timestamp' && typeof value === 'string') {
return value && value.replace('Z', '');
}
if (genericType === 'boolean' && typeof value === 'string') {
if (value.toLowerCase() === 'true') {View on GitHub (pinned to 7d981676b3)
Solutions
- This is the catch-all of downloadQueryResults; inspect the wrapped error to find whether the CREATE TABLE, INSERT, or SELECT on the random temp table failed
- Ensure the configured default database exists and the Aurora user has CREATE/INSERT/SELECT privileges on it
- Check the Data API call throttling (Aurora Serverless) — reduce concurrent statements or enable the loadPreAggregationWithoutMetaLock path
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/cubejs-mysql-aurora-serverless-driver/driver/AuroraServerlessMySqlDriver.js:136 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/e9958a66b73dbf8c.
Report an issue: GitHub.