cube-js/cube · error
Link '${linkName}' on dimension '${dimName}' conflicts with
Error message
Link '${linkName}' on dimension '${dimName}' conflicts with existing dimension '${syntheticName}' What it means
While generating the synthetic URL dimension for a dimension link (named <dimension>___link_<link>_url), the compiler found a non-synthetic dimension already occupying that name in the same cube. The collision happens because the manually declared dimension was not marked with synthetic: true, so the compiler refuses to overwrite it.
Source
Thrown at packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts:674
}
}
}
}
}
protected generateSyntheticLinkDimensions(cube: any) {
if (!cube.dimensions) return;
const dims = cube.dimensions;
for (const dimName of Object.keys(dims)) {
const dimDef = dims[dimName];
if (dimDef.links && Array.isArray(dimDef.links)) {
for (const link of dimDef.links) {
const linkName = typeof link.name === 'function' ? link.name() : link.name;
if (!linkName) return;
const syntheticName = `${dimName}___link_${linkName}_url`;
if (dims[syntheticName] && !dims[syntheticName].synthetic) {
throw new Error(`Link '${linkName}' on dimension '${dimName}' conflicts with existing dimension '${syntheticName}'`);
}
if (!dims[syntheticName]) {
let baseSql;
if (link.url) {
baseSql = link.url;
} else if (link.dashboard) {
const dashboardId = link.dashboard;
const escaped = dashboardId.replace(/'/g, "''");
// eslint-disable-next-line no-new-func
baseSql = new Function(`return \`'/dashboard/${escaped}'\``);
}
if (baseSql) {
const sql = this.buildLinkSqlWithParams(cube.name, baseSql, link.params || []);
dims[syntheticName] = {
sql,
type: 'string',
synthetic: true,
public: dimDef.public !== false,View on GitHub (pinned to 7d981676b3)
Solutions
- Rename the manually declared dimension so it does not collide with the generated <dimension>___link_<link>_url name
- Mark the existing dimension as synthetic: true if it is meant to be the link dimension
- Rename the link or the parent dimension to change the generated synthetic name
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts:674 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/b80a082ec21cc66b.
Report an issue: GitHub.