cube-js/cube · critical
Older version of orchestrator is being used with newer versi
Error message
Older version of orchestrator is being used with newer version of Cube Store driver. Please upgrade cube.js.
What it means
importStreamingSource requires uniqueKeyColumns to build CREATE SOURCE OR UPDATE for Cube Store streaming sources. Newer driver versions need this parameter, which older orchestrators don't pass — the driver detects the null and throws to prevent silently broken streaming pre-aggregations.
Source
Thrown at packages/cubejs-cubestore-driver/src/CubeStoreDriver.ts:459
)
);
await Promise.all(pipelinePromises);
const files = await Promise.all(filePromises);
if (files.length > 0) {
options.files = files.map(fileName => `temp://${fileName}`);
}
return this.createTableWithOptions(table, columns, options, queryTracingObj);
} finally {
await Promise.all(tempFiles.map(tempFile => unlink(tempFile)));
}
}
private async importStreamingSource(columns: Column[], tableData: StreamingSourceTableData, table: string, indexes: string, uniqueKeyColumns: string[] | null, queryTracingObj?: any, sealAt?: string) {
if (!uniqueKeyColumns) {
throw new Error('Older version of orchestrator is being used with newer version of Cube Store driver. Please upgrade cube.js.');
}
await this.query(
`CREATE SOURCE OR UPDATE ${this.quoteIdentifier(tableData.streamingSource.name)} as ? VALUES (${Object.keys(tableData.streamingSource.credentials).map(k => `${k} = ?`)})`,
[tableData.streamingSource.type]
.concat(
Object.keys(tableData.streamingSource.credentials).map(k => tableData.streamingSource.credentials[k])
),
queryTracingObj
);
let locations = [`stream://${tableData.streamingSource.name}/${tableData.streamingTable}`];
if (tableData.partitions) {
locations = [];
for (let i = 0; i < tableData.partitions; i++) {
locations.push(`stream://${tableData.streamingSource.name}/${tableData.streamingTable}/${i}`);
}
}View on GitHub (pinned to 7d981676b3)
Solutions
- Upgrade the whole cube.js package set together: yarn upgrade @cubejs-backend/server (and query-orchestrator, cubestore-driver) to the same release.
- Check installed versions (yarn why / npm ls) for mixed @cubejs-backend/* versions and dedupe.
- If streaming sources aren't needed, downgrade the cubestore driver to match the orchestrator.
- After upgrade, rebuild the pre-aggregation.
Example fix
// before (mixed versions)
"dependencies": {
"@cubejs-backend/cubestore-driver": "^0.36.0",
"@cubejs-backend/query-orchestrator": "^0.33.0"
}
// after
"dependencies": {
"@cubejs-backend/cubestore-driver": "^0.36.0",
"@cubejs-backend/query-orchestrator": "^0.36.0"
} Defensive patterns
Strategy: validation
Validate before calling
import pkgOrch from '@cubejs-backend/query-orchestrator/package.json';
import pkgDrv from '@cubejs-backend/cubestore-driver/package.json';
if (pkgOrch.version !== pkgDrv.version) {
console.warn(`Version mismatch: orchestrator ${pkgOrch.version} vs cubestore-driver ${pkgDrv.version}; streaming pre-aggregations will fail`);
} Try / catch
try {
await driver.uploadTable(table, columns, tableData);
} catch (e) {
if (e.message.includes('Older version of orchestrator')) {
console.error('Upgrade @cubejs-backend/server, query-orchestrator, and cubestore-driver together');
}
throw e;
} Prevention
- Always upgrade all @cubejs-backend/* packages together to the same release.
- Check yarn why / npm ls for duplicate mismatched versions and dedupe the lockfile.
- Read release notes before partial upgrades of backend packages.
- Pin backend packages to identical versions in package.json.
When it happens
Trigger: uploadTable called for a streamingSource table with uniqueKeyColumns=null, i.e. an older cubejs-query-orchestrator that predates the uniqueKeyColumns parameter being wired through.
Common situations: Partial upgrade: cubejs-cubestore-driver updated but cubejs-query-orchestrator/cubejs-server-core left on an older version (or vice versa in a monorepo with hoisted mismatched deps); lockfile pinning old orchestrator.
Related errors
- Unable to import (as stream) in Cube Store: empty columns. M
- Stream init error
- Unhandled encoding ordinal {}
- options.stream must be a function
- Driver's .streamQuery() method is not implemented yet.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/fe5c858ff1e80aec.
Report an issue: GitHub.