{"record":{"id":"d8b5e255dbf3dc05","repo":"cube-js/cube","slug":"auto-rollups-supported-only-in-enterprise-version","errorCode":null,"errorMessage":"Auto rollups supported only in Enterprise version","messagePattern":"Auto rollups supported only in Enterprise version","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-schema-compiler/src/adapter/PreAggregations.ts","lineNumber":907,"sourceCode":"    );\n  }\n\n  private static flattenMembers(members: BaseMember[]): BaseMember[] {\n    return R.flatten(\n      members.map(m => m.getMembers()),\n    );\n  }\n\n  private static flattenDimensionMembers(query: BaseQuery): BaseMember[] {\n    return this.flattenMembers([\n      ...query.dimensions,\n      ...query.filters,\n      ...query.segments,\n    ]);\n  }\n\n  public getCubeLattice(_cube, _preAggregationName, _preAggregation): unknown {\n    throw new UserError('Auto rollups supported only in Enterprise version');\n  }\n\n  /**\n   * Returns pre-agg which determined as applicable for the query (the first one\n   * from the list of potentially applicable pre-aggs). The order of the\n   * potentially applicable pre-aggs is the same as the order in which these\n   * pre-aggs appear in the schema file.\n   */\n  public findPreAggregationForQuery(): PreAggregationForQuery | undefined {\n    if (!this.preAggregationForQuery) {\n      if (this.query.useNativeSqlPlanner && this.query.canUseNativeSqlPlannerPreAggregation) {\n        this.preAggregationForQuery = this.query.findPreAggregationForQueryRust();\n      } else {\n        this.preAggregationForQuery =\n          this\n            .rollupMatchResults()\n            // Refresh worker can access specific pre-aggregations even in case those hidden by others\n            .find(p => p.canUsePreAggregation && (!this.query.options.preAggregationId || p.preAggregationId === this.query.options.preAggregationId));","sourceCodeStart":889,"sourceCodeEnd":925,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-schema-compiler/src/adapter/PreAggregations.ts#L889-L925","documentation":"getCubeLattice() is the extension point for automatic rollup (automatically suggested pre-aggregations) and is only implemented in Cube Enterprise. The open-source build always throws this UserError when some feature requests a lattice for a cube.","triggerScenarios":"Using features that require auto rollups — e.g. rollup designer auto-suggestions, scheduling/rollup auto-refresh driven by query analysis, or API endpoints that ask for suggested rollups — on the community edition.","commonSituations":"Running OSS cubejs-server-core but enabling enterprise config flags; calling CubeApi.sql/lattices endpoints expecting auto-rollup suggestions; following Enterprise docs while on the OSS package.","solutions":["Upgrade to Cube Enterprise (or Cube Cloud) if auto rollups are required.","Define pre-aggregations manually in the data model instead of relying on auto rollups.","Remove calls/configs that trigger lattice generation (e.g. autoRollups settings).","Use community tooling (query logging + manual pre-agg definitions) as a substitute."],"exampleFix":"// before\n// relying on auto rollup suggestion\ncompilerApi: ..., // expecting suggestedRollups\n// after\npreAggregations: { main: { measures: [CUBE.count], dimensions: [CUBE.country] } } // manual definition","handlingStrategy":"validation","validationCode":"const isEnterprise = process.env.CUBEJS_LICENSE_KEY;\nif (featureRequiresAutoRollups && !isEnterprise) {\n  throw new Error('Auto rollups require Cube Enterprise — define pre-aggregations manually instead');\n}","typeGuard":null,"tryCatchPattern":"try { await cubeApi.preAggregations(); } catch (e) { if (/Auto rollups supported only in Enterprise version/.test(e.message)) {\n  // fall back to manual pre-aggregation definitions\n  return manualPreAggregations; } throw e; }","preventionTips":["Check edition before enabling auto-rollup features (license key presence)","Define pre-aggregations explicitly in the data model on OSS","Avoid enterprise-only API endpoints unless running Enterprise","Read feature docs to confirm edition requirements before adopting"],"tags":["pre-aggregation","enterprise-only","auto-rollup"],"backgroundTag":"enterprise-feature-not-licensed","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}