03-data-modeling
Pages read: 42 (list of paths at the bottom)
Ground truth: Cube Core v1.8.35 in container cubebi-cube (@cubejs-backend/schema-compiler 1.8.35). Checked with read-only grep against schema-compiler/dist/src/compiler/{CubeValidator,CubeToMetaTransformer,CubeEvaluator,ViewGroupEvaluator,DataSchemaCompiler,transpilers/CubePropContextTranspiler}.js, server-core/dist/src/core/{CompilerApi,DevServer}.js, shared/dist/src/env.js and the Tesseract native binary native/native/index.node.
Main finding: almost everything in this slice that is model syntax compiles and runs in Core 1.8.35. This includes access policies with data masking and conditional masking, view groups, hierarchies, calendar cubes, multi-fact views, join aliases, dimension links, default_filters, dynamic formats and currency. Tesseract is the default planner (CUBEJS_TESSERACT_SQL_PLANNER defaults to true in env.js). Cloud's additions are the tooling around the model (IDE, Visual Model, dev-mode branches, Content Validator, Access Policies viewer, Model Configuration UI) and the consumers of some model keys (the AI agent reads meta.ai_context, workbooks read meta.auto_run, meta.default_ui_filters and dimension links drill-ins, and Cloud maps users to groups and userAttributes).
Data model fundamentals: cubes, members, syntax, naming, references
- Docs: pages/docs/data-modeling/overview.md, cubes.md, concepts/syntax.md; pages/reference/data-modeling/cube.md, segments.md
- What it does:
- Files live under
model/(configurable:schema_path,repository_factory). Use.yml(with Jinja) or.js, and you can mix them. Convention:model/cubes,model/views, view groups next to views. - Naming rules: a name starts with a letter, uses only
[A-Za-z0-9_], and is not a Python reserved word. Cube and view names are unique across the model. Member names (measures, dimensions, segments, pre-aggs, hierarchies) are unique within their cube. Folder names are unique within their view. The DAX API forbids names that clash with date-hierarchy column names. - Cube parameters:
name, sql | sql_table, sql_alias, extends, data_source, title, description, public, refresh_key {sql | every (interval or cron) | timezone}, meta, calendar, joins, dimensions, measures, segments, hierarchies, pre_aggregations, access_policy. - Reference syntax: bare column,
{member},{cube}.column,{cube.member}, join-path refs{a.b.d.id},{CUBE},{time_dim.granularity},{cube.sql()}. JS uses${...}. In YAML, escape literal braces with\{. Outside SQL params, members are referenced bare (CUBE.status). - Cube auto-parenthesises referenced compound member SQL to keep operator precedence. It does not parenthesise top-level snippets (GitHub issue 6373).
- Default
refresh_key:every: 2 minutefor BigQuery, Athena, Snowflake, Presto and Firebolt;10 secondfor all other sources. An interval is turned intoFLOOR(EPOCH/interval)SQL and checked about 10 times per interval (at least every 1 s, at most every 5 min). - Segments are named
WHEREpredicates (name, sql, description, public) and are queried throughsegments: [...].
- Files live under
- Availability: CORE. Evidence: all keys are in
CubeValidator.jsjoi schemas. No plan tier stated. - Core building blocks to use: schema-compiler,
/v1/meta,/v1/load,/v1/sql, SQL API. - To build on Core: nothing to build. Effort: none.
- Gotchas: setting
primary_key: trueflips the default ofpublictofalse.SECURITY_CONTEXTin model code is deprecated; usequery_rewriteor access policies instead.
Dimensions (types, case, sub-queries, geo, switch, primary keys)
- Docs: pages/docs/data-modeling/dimensions.md; pages/reference/data-modeling/dimensions.md
- What it does:
- Types:
time | string | number | boolean | switch | geo.geotakeslatitude.sqlandlongitude.sql.switchtakes onlyvalues(nosql). It needs Tesseract, and/v1/metareports it astype: stringwith itsvalues.
- Parameters:
case.when[{sql,label}] / else.label,title, description, public, meta, order (asc|desc), primary_key(several primary keys make a composite key),sub_query,propagate_filters_to_sub_query,mask,granularities,time_shift(calendar cubes only),links,format,currency. - Proxy dimensions reference other dimensions, including ones in joined cubes. Subquery dimensions (
sub_query: true) turn another cube's measure into a per-row value (a correlated subquery done through joins). - Default granularities: year, quarter, month, week (Monday start), day, hour, minute, second.
- Types:
- Availability: CORE. Evidence:
CubeValidator.jshasgeo,switch,propagateFiltersToSubQuery,currencyandorder:.CubeToMetaTransformer.jsemitscurrency,order,linksandsyntheticin/v1/meta. - Core building blocks to use:
/v1/metadimension metadata. - To build on Core: nothing to build. Effort: none.
- Gotchas:
currencyis only valid onnumberdimensions.
Custom granularities
- Docs: pages/reference/data-modeling/dimensions.md (
granularities), docs/data-modeling/dimensions.md, concepts/syntax.md - What it does:
- Defined as
granularities: [{name, title?, interval, offset? | origin?}]on time dimensions, e.g.interval: 1 week, offset: -1 day, ororigin: "2025-04-01". Can be referenced as{created_at.sunday_week}and used in pre-aggregationgranularity. - A
sql:override is allowed only under a default-granularity name. Otherwise compilation fails with "must be named after one of the predefined granularities". - Supported sources: Athena, Redshift, DuckDB, Databricks, BigQuery, ClickHouse, MSSQL, MySQL, Postgres, Snowflake.
- The REST API can query a custom granularity by name. The SQL API, GraphQL and BI tools cannot; they need a proxy dimension.
- Defined as
- Availability: CORE. Evidence: that error string is in
CubeValidator.js. - Core building blocks to use: REST
timeDimensions.granularity, proxy dimensions. - To build on Core: nothing to build.
- Gotchas: SQL API and BI tools need a proxy dimension for each custom granularity.
Display metadata: format, currency, title/description, order
- Docs: pages/reference/data-modeling/dimensions.md (
format,currency,order), measures.md (format, dynamic format,currency) - What it does:
- Dimension formats:
- string:
imageUrl,link, and{type: link, label} - number:
number[_N] | percent[_N] | currency[_N] | abbr[_N] | accounting[_N] | id, or a d3-format string - time: a strftime / d3-time-format string
- string:
- Measure formats are the same named formats or d3 strings.
_Nis the maximum number of decimals (0–6, default 2). - Dynamic format:
format: {sql: ...}is an aggregate string expression evaluated per row. It compiles into a hidden<measure>___formatmeasure that obeys access policies. The DAX API uses it for Power BI. currency: ISO 4217 code, numeric types only.- Workbook rendering:
linkrenders as a clickable link only for http, https and mailto.imageUrlrenders a thumbnail only for https anddata:image/*; the image is fetched by the browser and Cube does not proxy it. Thumbnails are clickable only iflinksexist.
- Dimension formats:
- Availability: CORE+CLOUD. Core compiles the keys, creates the
___formatsynthetic measure (CubeSymbols.js) and exposesformat,formatDescriptionandcurrencyin/v1/meta(CubeToMetaTransformer.js). Cloud adds the rendering in Workbooks/Explore, image thumbnails, the Style-tab overrides and DAX formatting. - Core building blocks to use:
/v1/metaformat,formatDescriptionandcurrency; query the___formatmember next to the measure. - To build on Core: a front-end formatter (d3-format and d3-time-format), image and link cell renderers. Effort: S.
- Gotchas: the dynamic-format SQL must aggregate. To keep pre-aggregation matching, it should reference additive measures only.
Dimension links (external URLs and dashboard drill-ins)
- Docs: pages/docs/data-modeling/dimensions.md (Links), pages/reference/data-modeling/dimensions.md (
links) - What it does:
links: [{name, label, url | dashboard, icon (Tabler name), primary, target (blank|self), params: [{key, value}]}].urlanddashboardare mutually exclusive, and at most one link per dimension can beprimary.- Each link compiles to a hidden synthetic dimension
<dim>___link_<name>_url. It is added to the query automatically and evaluated per row.paramsvalues are URL-encoded with the database's encoding function. - A
dashboard:link generates the URL/dashboard/<slug>?params. In Cloud the slug is resolved per deployment, and each param becomes an equality filter on the target dashboard's view member (a cube path is auto-resolved to the view member). An unknown slug is skipped. - UI: a left-click on a cell opens a menu (all links, Copy value, Drill down on measures). The
primarylink renders inline on the cell.urllinks default totarget: blank, drill-ins toself. Cmd/Ctrl-click opens a new tab. A row whose link URL is null drops that link from its menu. - Requires Cube v1.6.53 or later; honouring
targeton drill-ins requires v1.7.5 or later.
- Availability: CORE+CLOUD. Plan not stated.
- Core:
LinksSchemawith.oxor('url','dashboard')inCubeValidator.js, the___link_synthetic dimensions inCubeSymbols.js, andlinksemitted in/v1/meta. - Cloud: the table cell menu, the dashboard-slug registry and the drill-in navigation and filtering.
- Core:
- Core building blocks to use:
/v1/metalinksand thesyntheticflag. Synthetic___link_*_urlcolumns come back in/v1/loadresults. - To build on Core: a table cell-menu UI, a dashboard registry with slugs (your own storage) and a drill-in router that turns
paramsinto filters. Effort: S–M. - Gotchas:
- Every reference in a link URL must have a single value per value of the dimension, or rows are duplicated.
- Synthetic columns must be hidden in your UI.
Measures: types, filters, calculated measures, drill members
- Docs: pages/docs/data-modeling/measures.md; pages/reference/data-modeling/measures.md
- What it does:
- Types:
count(sqloptional)count_distinctcount_distinct_approx(HLL, additive)sum,avg,min,maxnumber(arithmetic over other measures)number_agg(custom aggregate; Tesseract only)string,time,boolean(aggregate expressions)
filters: [{sql}]compiles toCASE WHEN. Calculated measures can reference other measures in the same or joined cubes.- Other parameters:
title, description, public, meta, mask, format, currency, drill_members. - A drill-down query groups by the listed dimensions and computes the listed measures. The drilled measure is not added automatically, and segments are ignored.
- Types:
- Availability: CORE. Evidence:
CubeValidator.js(numberAgg,drillMembers,mask). - Core building blocks to use:
/v1/metadrillMembers; the REST drill-down pattern. - To build on Core: nothing to build (a drill-down UI belongs to another slice).
- Gotchas:
count_distinctis not additive, so it cannot be rolled up in pre-aggregations. Usecount_distinct_approxwhen roll-ups matter.
Multi-stage measures (rolling window, period-to-date, time shift, grain, filter override, ranking, case/switch)
- Docs: pages/docs/data-modeling/measures.md; pages/reference/data-modeling/measures.md
- What it does:
rolling_window:{type: fixed|to_date, granularity, trailing, leading, offset: start|end}.trailingandleadingacceptN unitorunbounded.to_daterequiresgranularityand takes none ofoffset,trailingorleading.year_to_date,quarter_to_dateandmonth_to_dateare deprecated, and Tesseract ignores them.- Tesseract does not need a date range if the source can generate a time series. The date range is still required on other sources and for custom granularities on BigQuery, MSSQL and Snowflake. MySQL needs
CUBEJS_DB_MYSQL_USE_GENERATED_TIME_SERIES.
multi_stage: true: each stage becomes CTEs.time_shift: [{time_dimension?, type: prior|next, interval | name}].namerefers to a named calendar-cube shift.grain: {keep_only | exclude, include}controls the inner GROUP BY (percent of total, ranking, nested aggregates). It replaces the legacygroup_by,reduce_byandadd_group_by.filter: {exclude, keep_only, include (query-style filters with nested and/or), mode: relative|fixed}overrides inherited filters.order_bywithtype: rankranks rows.case: {switch: {CUBE.switch_dim}, when: [{value, sql}], else: {sql}}requiresmulti_stage.
- Declare
grainon the measure that combines its inputs. If two inputs both declare the samegrain.includeand the combining measure does not, they are combined with a silent cross join. - For
casemeasures across cubes, use one sharedswitchdimension; one switch per cube produces extra rows.
- Availability: CORE. The docs mark it as powered by Tesseract, which is the default in 1.8.x. Evidence:
CubeValidator.js(multiStage,grain,keepOnly,timeShift,switch),CUBEJS_TESSERACT_SQL_PLANNERdefaults totrue, and Tesseract is innative/index.node. - Core building blocks to use: Tesseract SQL planner.
- To build on Core: nothing to build.
- Gotchas:
- A
time_shift, or afilterwithexcludeorkeep_only, stops a query filter from lifting conditional masks (see access policies). - Setting
CUBEJS_TESSERACT_SQL_PLANNER=falsedisables many of these features.
- A
Calendar cubes (retail and fiscal calendars)
- Docs: pages/docs/data-modeling/concepts/calendar-cubes.md; reference/data-modeling/cube.md (
calendar), dimensions.md (time_shift,granularities.sql), context-variables.md (time_shiftsin FILTER_PARAMS) - What it does:
calendar: trueon a cube built over a calendar table. Its time dimension can:- override default granularities with
sqlcolumns (e.g. 4-5-4 months) - define
time_shift: [{name?, type, interval, sql?}]that maps a date to a pre-computed prior date
- override default granularities with
- Requirements:
- exactly one
primary_key, and it must be the time dimension used to join the calendar (a second primary key fails at query time: "only one is allowed for calendar cubes") - the join dimension of the fact cube must also be of type
time
- exactly one
- Several date columns: join the calendar once per date column using join
alias(e.g.purchase_calendar,cancellation_calendar). Queries then use paths such assubscriptions.cancellation_calendar.date. - Measures reference shifts by interval or by
name.FILTER_PARAMS.<cal>.<dim>.time_shifts.<shift>.filter(fn)lets you push down the shifted range. - A pre-aggregation must declare the overridden granularity itself. A finer rollup gives wrong (Gregorian) buckets or fails.
- Availability: CORE (Tesseract; not default before v1.7.0). Evidence:
calendar:inCubeValidator.jsand the error string "only one is allowed for calendar cubes" innative/index.node. - Core building blocks to use: Tesseract, join aliases, FILTER_PARAMS.
- To build on Core: nothing to build.
- Gotchas: a granularity override can only use a default granularity name. Use
intervalfor new names such asfiscal_week.
Joins: relationships, direction, aliases, fan/chasm traps
- Docs: pages/docs/data-modeling/joins.md; pages/reference/data-modeling/joins.md
- What it does:
joins: [{name, alias?, relationship: one_to_one|one_to_many|many_to_one, sql}]. The legacy nameshas_one,has_manyandbelongs_tostill work.- All joins are directed
LEFT JOINs. There is no INNER, RIGHT or FULL join; emulate them with asetfilter or in cube SQL. - Join paths are resolved with Dijkstra. When several paths are possible, members are collected in this order: measures, dimensions, segments, time dimensions. Views pin the path.
- A primary key is required. Fan and chasm traps are handled with a distinct-key dedup subquery, and such queries are non-additive for pre-aggregation matching.
alias(v1.8.7+, Tesseract):- joins the same cube several times (role-playing dimensions); each alias is its own SQL copy (
orders__customer) - queried as
orders.customer.city - cannot equal a cube or member name, cannot contain
__, and cannot collide after snake-casing - an
extendschild cannot redeclare an aliased join - pre-aggregations of the joined cube do not serve queries that come through an alias, and
rollup_joincannot use aliases - members reached through an alias appear in metadata only through views
- joins the same cube several times (role-playing dimensions); each alias is its own SQL copy (
- Without aliases, only one join per pair of cubes is allowed. The workaround is an
extendscopy of the cube.
- Availability: CORE. Evidence:
aliasin theCubeValidator.jsjoins schema. - Core building blocks to use: views with
join_path. - To build on Core: nothing to build.
- Gotchas: access policies apply to every aliased copy of a cube. Row filters and masks are applied to each copy independently.
Views (curation, join paths, view members, folders, default_filters, extends)
- Docs: pages/docs/data-modeling/views.md, extending-cubes.md; pages/reference/data-modeling/view.md
- What it does:
cubes: [{join_path, includes ("*" or a list of names or {name, alias, title, description, format, meta}), excludes, prefix}]. Included members do not inheritpublic: falsefrom the cube.- View-level
measuresanddimensionsmay only combine members the view already includes, referenced as{CUBE.member}. A view member that reads a column fails at compile time ("defines own member"). Usemulti_stagewhen the members come from different cubes. folders: [{name, includes: [member | {join_path} | nested folder]}]. Folders do not overlap. For tools that cannot show nesting, the structure is flattened, or kept as path-like names viaCUBEJS_NESTED_FOLDERS_DELIMITER.default_filters: [{member, operator (REST operators), values, unless: [members]}]are enforced on every query against the view, including filter suggestions. Querying or filtering any member listed inunlessreleases the filter.extendson views inherits the parent'scubesincludes, view measures and dimensions, folders, access policies (child policies are added, not replaced) and other unset parameters. A child cannot remove an inherited member.publiccan be dynamic, e.g.COMPILE_CONTEXT.security_context.is_finance.- A view may span data sources. A query touching more than one data source needs a covering
rollup_join.
- Availability: CORE. Evidence:
defaultFilterswithunlessandfoldersinCubeValidator.js,defaultFiltershandled inCubeEvaluator.js, andCUBEJS_NESTED_FOLDERS_DELIMITERin env.js. - Core building blocks to use:
/v1/meta(folders, nested folders),default_filters. - To build on Core: nothing to build. A folder tree UI is S.
- Gotchas: in a view, member-level policies of the underlying cubes are ignored, but their row-level filters and masks still apply.
View meta keys consumed by the Cloud UI: meta.auto_run, meta.default_ui_filters
- Docs: pages/reference/data-modeling/view.md (
meta.auto_run,meta.default_ui_filters); docs/data-modeling/configuration.md (Auto-run) - What it does:
auto_run: falsemakes workbook and Explore tabs on that view wait for Run query. Precedence: the user's per-tab toggle, then the view'smeta.auto_run, then the deployment-wideCUBEJS_AUTO_RUN_MODE(defaulttrue).default_ui_filtersare editable filters pre-filled when the view is selected in workbooks, the React Embed SDK or the Sheets/Excel add-in. Each entry is{member, operator, value|values, measure?}.- Operators use filter-bar labels (
is,contains,between,top n,in the quarter, ...). They are case- and whitespace-insensitive, and REST aliases (equals,gte,inDateRange) are also accepted. - Relative date grammar:
now,today,yesterday,this <unit>,N <units> ago|from now,start of N <units> ago|from now, ISO dates and numbers. - On dates,
ismeans equality at the value's grain. Bothbetweenbounds are inclusive, except that a range ending at a period start is exclusive at the end. - Relative values resolve at query time.
- An invalid entry is dropped with a browser-console warning.
- The filters apply only to new queries; they are never enforced through APIs.
- Operators use filter-bar labels (
- Availability: CLOUD-ONLY behaviour on top of a Core passthrough.
- Core:
metaisjoi.any(), so these keys compile and are returned in/v1/meta. Core contains no code readingauto_runordefault_ui_filters.CUBEJS_AUTO_RUN_MODEexists inshared/env.js(autoRunMode, defaulttrue), but no other Core package reads it. - Cloud: the workbook and embed UI behaviour.
- Core:
- Core building blocks to use:
/v1/metaviewmeta; REST filter operators.default_filterscovers the enforced variant. - To build on Core: front-end logic in your query builder: read
meta.auto_run, plus a parser that turns the relative-datedefault_ui_filtersgrammar into REST filters. Effort: S–M (the relative-date grammar and its inclusive/exclusive edge cases are most of the work). - Gotchas: the docs say these keys may move out of
metain the future.
Multi-fact views (and SQL API view-join merging)
- Docs: pages/docs/data-modeling/multi-fact-views.md
- What it does:
- When a view includes measures from several fact cubes that share dimension cubes, Cube picks the root at query time. It runs one aggregating subquery per fact, then
FULL JOINs them on the shared dimensions; missing values are NULL. - Requirements:
- each fact has direct joins to every shared dimension cube
- dimension cubes appear at root
join_paths - use
prefixto tell same-named fact measures apart - a fact that lacks a key can use
NULL AS fk
- Filters:
- filters on shared dimensions are pushed into every subquery
- measure filters become
HAVINGafter the join - fact-specific filters and segments make the query fail with "Can't find join path"; use the measure's own
filtersinstead
- A view measure that combines facts must be
multi_stage. Without it the query fails with "Can't find join path". - SQL API: joining two or more views on a shared dimension and grouping by it is merged into one multi-fact query.
- The join type maps to the result: FULL keeps all keys, INNER keeps keys in both, LEFT/RIGHT keep one side.
- A join on
DATE_TRUNCmust use the same grain as the GROUP BY. - Ungrouped
SELECT *queries are not merged.
- When a view includes measures from several fact cubes that share dimension cubes, Cube picks the root at query time. It runs one aggregating subquery per fact, then
- Availability: CORE (Tesseract; not default before v1.7.0). Evidence: multi-fact symbols are in
native/index.node, and Tesseract is the default in 1.8.35. - Core building blocks to use: views, SQL API, Tesseract.
- To build on Core: nothing to build.
- Gotchas: every grouped dimension, filter and segment must be reachable from every fact.
View groups
- Docs: pages/docs/data-modeling/view-groups.md; pages/reference/data-modeling/view-group.md
- What it does:
- A top-level
view_groups: [{name, title, description, includes: [view names | nested group objects]}]. A view can belong to several groups. - Also supported: a
viewGroup/viewGroupskey on the view itself, and theview_group()global in JS. /v1/metareturns a top-levelviewGroupsarray (includeskeeps the authored order), and each grouped view carries aviewGroups: [names]array.
- A top-level
- Availability: CORE. Evidence:
ViewGroupEvaluator.js,viewGroupSchemainCubeValidator.js,viewGroupsinapi-gateway/gateway.jsandCubeToMetaTransformer.js, andview_groupregistered inDataSchemaCompiler.js. - Core building blocks to use:
/v1/metaviewGroups. - To build on Core: a catalog or navigation UI. Effort: S.
- Gotchas: none found.
Hierarchies
- Docs: pages/reference/data-modeling/hierarchies.md; docs/data-modeling/dimensions.md
- What it does:
hierarchies: [{name, title, levels: [dims from least to most granular, may include joined-cube dims], public}]on cubes.- Hierarchies are exposed through views via
includes. Whether they are displayed depends on the visualization tool, and the Playground can preview them.
- Availability: CORE. Evidence:
hierarchiesinCubeValidator.js, andCubeToMetaTransformer.jsemitshierarchies. - Core building blocks to use:
/v1/metahierarchies. - To build on Core: drill-down UI only (other slice).
- Gotchas: none found.
Extending cubes and views; polymorphism; FILTER_PARAMS in parents
- Docs: pages/docs/data-modeling/extending-cubes.md; reference/data-modeling/cube.md (
extends) - What it does:
- A child cube merges the parent's measures, dimensions, segments and joins. A child may redefine an inherited join, which replaces it.
- Inside the parent, use
{CUBE}rather than the parent's name. - When the parent uses
FILTER_PARAMS, either overridesqlin each child, or list the children'sFILTER_PARAMSin the parent. Unused ones render as1 = 1. - In JS, a nameless
cube()returns an unregistered reference that can be used as a base.
- Availability: CORE.
- Core building blocks to use: model
extends. - To build on Core: nothing to build.
- Gotchas: none found.
Context variables: CUBE, FILTER_PARAMS, FILTER_GROUP, SQL_UTILS, COMPILE_CONTEXT, SECURITY_CONTEXT
- Docs: pages/reference/data-modeling/context-variables.md
- What it does:
FILTER_PARAMS.cube.member.filter('col' | fn)pushes query filter values into cube SQL. It must be a top-levelWHEREexpression.- A function receives raw driver strings; a date range passes two arguments.
- It can name a segment, in which case the whole predicate is rendered, or
1 = 1when the segment is not selected. - It can address a calendar time shift through
.time_shifts.<name>.filter(fn).
- Segment and time-shift bindings work only with Tesseract; on the legacy planner they render as
1 = 1. FILTER_GROUP(...)is required when there are severalFILTER_PARAMS, so that OR and boolean query filters render correctly.SQL_UTILS.convertTz(col)converts a timestamp column to the request's time zone. Do not use such dimensions astimeDimensions, or the conversion is applied twice.COMPILE_CONTEXTholdssecurityContextplus anything fromextend_context. It is evaluated once percontext_to_app_idkey.SECURITY_CONTEXT(withrequiredFilter) is deprecated and carries an SQL injection risk.
- Availability: CORE.
- Core building blocks to use:
context_to_app_id,extend_context,scheduled_refresh_contexts. - To build on Core: nothing to build.
- Gotchas:
COMPILE_CONTEXTis per app id, not per user. Per-user logic belongs inquery_rewriteor access policies.
Dynamic data models: Jinja + Python (YAML) and JavaScript
- Docs: pages/docs/data-modeling/dynamic/index.md, jinja.md, javascript.md, schema-execution-environment.md, code-reusability-export-and-import.md
- What it does:
- YAML/Jinja:
- loops, macros,
{% import "macros/x.jinja" as m %}(path relative tomodel/) - auto-escaping wraps substituted values in JSON quotes, so use
| safe(or aSafeStringsubclass) whenever a value is concatenated with other text - for multi-line SQL from macros use
indent(N) | safe, in that order
- loops, macros,
- Python:
model/globals.pyusesTemplateContext(add_variable,add_function/@function,add_filter/@filter)@memocaches a call once per argument set per compilation; sync and async are supported- local module imports work
requirements.txtis pip-installed at startup; native extensions need a custom image
- JavaScript:
asyncModule(async () => { ... cube(...) })runs at the end of each compile stage;sqlanddrill_membersmust be functions therememo(key?, fn)caches per compilation across stages; callingcube,view,view_group,contextorasyncModuleinsidememothrows- ES6
importandexportare transpiled to the VM'srequire(which can import from parent directories) - no
processorconsole
schema_version(which may be async, e.g. per tenant) triggers recompilation. Dynamic cubes needdata_sourceplus adriverFactorywhen several databases are used.
- YAML/Jinja:
- Availability: CORE+CLOUD.
- Core: Jinja, Python,
TemplateContext,memoandSafeStringare embedded innative/index.node(def memo(func),class SafeString); JSmemoandview_groupare inDataSchemaCompiler.js. - Cloud: Jinja Preview in the IDE. The docs say Core has no rendered-YAML preview (GitHub issue 8134).
- Core: Jinja, Python,
- Core building blocks to use:
schema_version,context_to_app_id,repository_factory,driver_factory,/v1/metato inspect the compiled result. - To build on Core: a Jinja-preview tool, i.e. a dev endpoint or CLI that renders templates with the same
globals.pycontext. Effort: S–M (re-using Cube's renderer is not exposed as an API; you would re-implement the rendering with Jinja2 plus the TemplateContext registrations). - Gotchas: Jinja escaping errors surface as YAML parse errors far from their cause, which is why a preview tool matters.
Python helper packages: cube, cube_dbt, lkml2cube
- Docs: pages/reference/data-modeling/cube-package.md, cube_dbt.md, lkml2cube.md
- What it does:
cube(built in):configobject or decorator forcube.pyoptionsTemplateContextmemo: argument matching by equality for hashables, lists, dicts and sets; other objects match only themselves; works only inside template-function calls
cube_dbt(PyPI):- loading:
Dbt.from_file,Dbt.from_urlorDbt(dict) .filter(paths, tags, names)(paths without themodels/prefix)- models:
.modelsand.model(name), which skip ephemeral models Model.{name, description, sql_table, columns, column, primary_key, as_cube(), as_dimensions(skip)}Column.{name, description, sql, type (heuristic map, default string), meta, primary_key (from theprimary_keytag), as_dimension()}- rendered snippets are pre-indented 4, 6 or 8 spaces
- loading:
lkml2cube(PyPI CLI):cubesconverts LookML views to cubes (no joins);--parseonlydumps the parsed objectviewsconverts explores to cubes and views with joins
- Availability: CORE. Evidence: the
cubepackage is in the native module;cube_dbtandlkml2cubeare open-source PyPI packages. The docs give install instructions for both Core (pip install -r requirements.txtin the container) and Cloud (automatic). - Core building blocks to use:
requirements.txt, Jinja templates. - To build on Core: nothing to build.
- Gotchas: none found.
Security context, query_rewrite, COMPILE_CONTEXT (programmatic access control)
- Docs: pages/docs/data-modeling/access-control/context.md, access-control/index.md
- What it does:
- A JWT in the
Authorizationheader is verified (JWKS supported). Its claims becomesecurityContext, which must be an object ("Cannot create proxy with a non-object" otherwise). query_rewrite(query, ctx)adds mandatory filters, role-based filters or per-cube filters, or raises to deny.context_to_app_idplusCOMPILE_CONTEXTcompile one model per tenant. Example: a Pythonmasked()helper inglobals.py, or dynamicpublic.extend_contextenriches the context.- Pre-aggregations that depend on
COMPILE_CONTEXTneedscheduled_refresh_contexts. - The Playground lets you set or build JWTs for testing.
cubeCloudis a reserved key in the security context. Cloud's "Enable Cloud Auth Integration" toggle injects the authenticated user's information.
- A JWT in the
- Availability: CORE+CLOUD. Core has the whole mechanism (config options in
config.md). Cloud adds Cloud Auth Integration, i.e. populatingsecurityContext.cubeCloudfrom Cloud users, groups and attributes. - Core building blocks to use:
check_auth,query_rewrite,extend_context,context_to_app_id,scheduled_refresh_contexts,CUBEJS_JWK_URL. - To build on Core: an identity provider that issues JWTs with user claims. To mimic Cloud, put
cubeCloud.userAttributesandcubeCloud.groupsinto the token (see next section). Effort: S. - Gotchas:
CUBEJS_DEV_MODE=truein Core disables JWT checks (see Development mode below).
Access policies (member-level, row-level, conditions, data masking)
- Docs: pages/docs/data-modeling/data-access-policies.md, access-control/member-level-security.md, access-control/row-level-security.md; pages/reference/data-modeling/data-access-policies.md
- What it does:
- Policy shape:
access_policy: [{group | groups, conditions: [{if}], member_level: {includes | excludes}, row_level: {filters | allow_all}, member_masking: {includes | excludes}}]on cubes or views. - Defaults and validation:
- once any policy exists, groups without a policy are denied
group: "*"matches everyone- an empty
member_levelis rejected member_maskingrequiresmember_level
- Evaluation model (a 2-D space of members by rows):
- members are the union across matching policies
- for each queried member, its visible rows are the union of the row filters of the policies that grant it; the row sets of the queried members are then intersected
- a member granted by no matching policy means denial (empty result)
- Combination with other mechanisms:
- member-level rules are AND-ed with
public - in a view, only the view's member-level rules apply
- row filters are AND-ed with
query_rewrite, and a view's row filters are AND-ed with its cubes' row filters
- member-level rules are AND-ed with
- Masking:
maskon a member is a static value or{sql}(default NULL; the global defaults areCUBEJS_ACCESS_POLICY_MASK_{STRING,NUMBER,BOOLEAN,TIME})- full access wins over masking
- "conditionally unmasked": if a policy grants full access but has a row filter, the SQL becomes
CASE WHEN rowFilter THEN value ELSE mask END - a query filter at least as strict as the policy's row filter lifts the mask, except when the query uses a
time_shiftor a multi-stagefilterwithexcludeorkeep_only - numeric range filters lift masks only on
type: numbermembers, with plain decimal bounds - a conditionally masked measure that is not grouped by the filter's members is fully masked
- SQL masks on measures are not applied in ungrouped SQL API queries
- Conditions:
ifis a Python expression in YAML (onlyand,or,not, member access and.includes()) or a full JS expression in JS models. - Row filters: use the REST filter format, including
andandor. Numeric values must be decimals, so"007"is rejected.
- Policy shape:
- Availability: CORE+CLOUD. Plan not stated.
- Core: the full engine, in
CubeValidator.js(accessPolicy,memberLevel,rowLevel,memberMaskingwith.with('memberMasking','memberLevel'),conditions,allowAll) andserver-core/CompilerApi.js(policy union and intersection,maskedMembersSet, the conditionalCASE WHENmasks, per-user/v1/metavisibility). The mask env vars are in env.js. - Cloud: automatic mapping of authenticated users to groups and user attributes.
- The docs say
userAttributesis Cloud-only. In fact, Core'sCubePropContextTranspiler.jsrewrites the shorthandsuserAttributes,user_attributesandgroupstosecurityContext.cubeCloud.userAttributesandsecurityContext.cubeCloud.groups.
- Core: the full engine, in
- Core building blocks to use:
context_to_groups(without it the group set is empty, so onlygroup: "*"policies ever match)securityContext.*in filters and conditionsquery_rewritefor anything policies cannot express
- To build on Core:
- a user, group and attribute store plus a JWT minter, and
context_to_groups: ctx => ctx.securityContext.cubeCloud?.groups ?? [] - to make Cloud-authored models (which use
userAttributes.*) run unchanged, putcubeCloud: {userAttributes: {...}, groups: [...]}into the security context - Effort: S for the minimal version; M with an admin UI for users, groups and attributes.
- a user, group and attribute store plus a JWT minter, and
- Gotchas:
- Policies on cubes do not restrict member access when the cube is queried through a view; put policies on views.
- Range-filter unmasking on a
numberdimension built over a text column can leak rows.
Access Policies viewer
- Docs: pages/docs/data-modeling/access-policies-viewer.md
- What it does:
- Model → Access Policies in the Cloud UI. Requires the
PlaygroundReadpermission. Read-only, and it follows the branch or build you are viewing (dev mode included). - List view: one row per group declared anywhere.
*is shown as "All groups". Columns: Policies (count of cubes and views with an explicit policy, with a hover list) and Default policy (cubes covered by*plus cubes with no policy at all). - Detail view: one row per accessible cube or view. Columns:
- Condition: count of conditions, or
— - Member-level: Allow all / Deny all / Allow: list
- Member masking: list of masked members
- Row-level: Allow all / Filters on: dimensions
- Member names are shortened to their last path segment.
- Condition: count of conditions, or
- It does not edit policies, show group membership or run preview queries.
- Model → Access Policies in the Cloud UI. Requires the
- Availability: CLOUD-ONLY. Evidence: Cloud UI instructions and a Cloud permission. Core
/v1/metadoes not expose policies (accessPolicydoes not appear inCubeToMetaTransformer.jsorgateway.js). - Core building blocks to use: run the compiler offline, i.e. load the model with
@cubejs-backend/schema-compiler(prepareCompiler) in a Node script and readcubeEvaluatorcube definitions (accessPolicy, already normalised with includes and excludes resolved). Alternatively parse YAML directly (this misses JS and Jinja models). - To build on Core: an introspection service plus a 2-table UI; optionally a "test as group" runner that mints JWTs and calls
/v1/loadwith a dry run. Effort: M. - Gotchas: resolving
includes: "*",excludesand view-versus-cube semantics yourself is error-prone. Use the compiler's evaluated output rather than raw YAML.
AI context (description and meta.ai_context)
- Docs: pages/docs/data-modeling/ai-context.md; also mentioned in views.md, reference cube.md, view.md, measures.md, dimensions.md
- What it does:
descriptionis shown in the UI and also read by the agent.meta.ai_contextis read only by the agent. It is read on views, measures and dimensions; cube-levelai_contextis ignored by the agent.- It is truncated silently at 2,000 characters.
- A member-level
ai_contextcan be overridden per view throughincludes: [{name, meta: {ai_context}}]; note thatmetais overridden as a whole. - Guidance from the docs: prefer focused views, document which measure to prefer, synonyms and acronyms.
- Availability: CORE+CLOUD.
- Core:
metaisjoi.any()on every entity, and the include-levelmetaoverride is inCubeValidator.js("Override the metadata of the included member as a whole"), soai_contextcompiles and is returned in/v1/meta. There is noai_contextstring anywhere in Core code. - Cloud: the AI agent (Analytics Chat) consumes it and applies the 2,000-character limit and the cube-level exclusion.
- Core:
- Core building blocks to use:
/v1/meta(descriptions,meta.ai_context, view groups, folders), the REST or SQL API for execution. - To build on Core: an LLM agent that builds its prompt from
/v1/meta: the view list, viewai_context, member descriptions andai_context. It must apply the same precedence rules (the view's include override wins, cube-level is ignored) and a length cap. Effort: M for prompt assembly (the agent itself is another slice). - Gotchas:
/v1/metais already filtered to what the user can access, which is the correct scoping for the agent.
Model configuration (deployment defaults: time zone, row limits, timeout, auto-run)
- Docs: pages/docs/data-modeling/configuration.md
- What it does:
- Settings → Configuration in Cloud is a typed UI over these environment variables:
CUBEJS_DEFAULT_TIMEZONE(default UTC, TZ database names)CUBEJS_DB_QUERY_DEFAULT_LIMIT(default 10,000)CUBEJS_DB_QUERY_LIMIT(hard cap, default 50,000; streaming SQL API queries may exceed it)CUBEJS_DB_QUERY_TIMEOUT(default 10m; accepts30s,2hor seconds)CUBEJS_AUTO_RUN_MODE
- Saving restarts the dev-mode worker immediately; production picks up the change at the next build.
- Settings → Configuration in Cloud is a typed UI over these environment variables:
- Availability: CORE+CLOUD. The four query env vars are Core (present in env.js). The UI and the restart orchestration are Cloud. Auto-run is used only by the Cloud UI: the env var is defined in Core but nothing reads it.
- Core building blocks to use: environment variables,
cube.js/cube.py. - To build on Core: a settings UI that writes env or config and restarts the container. Effort: S.
- Gotchas: raising
CUBEJS_DB_QUERY_LIMITrisks out-of-memory errors and denial of service.
Data Model IDE (browser code editor, branches, change review, model generation)
- Docs: pages/docs/data-modeling/data-model-ide.md
- What it does:
- Model › IDE: a code editor over the deployment's Git repo.
- The Dev mode button opens a branch-picker dialog (choose a branch or create a new one; committing to main is configurable).
- Branch switcher: create a branch from another branch, delete the current branch (optionally on GitHub too), copy a
?branch=link. - Shared branches are visible to every user of the deployment.
- Leaving with unsaved changes shows a warning (Go back / Discard / Save).
- Changes tab:
- per-file diff cards, with a selectable "Compare with" base
- per-user "Viewed" marks; a file that changes afterwards shows "Changed since viewed" with only the incremental diff
- after a squash, the full diff is shown
- Generate data model wizard (in Visual Model, ⋮ menu): regenerating existing cubes renames the old files to
.backup. Outside Premium it is available only when a deployment is created.
- Availability: CLOUD-ONLY. The Generate-data-model wizard after deployment creation requires Premium or above.
- Core building blocks to use: Core Playground dev endpoints (
/playground/files,/playground/db-schema,/playground/generate-schema,/playground/test-connection,/playground/context; present inserver-core/DevServer.js, dev mode only), hot reload in dev mode,/v1/metafor validation errors. - To build on Core:
- a web IDE (e.g. Monaco) with YAML/JS language support
- a Git service (libgit2 or GitHub API) for branches, diffs, commits and merges
- per-user "viewed" state storage
- per-branch Cube instances (see Development mode)
- a schema generator (reuse
/playground/generate-schemaor your own introspection) - Effort: L.
- Gotchas: Core's Playground file endpoints are unauthenticated and live only under
CUBEJS_DEV_MODE, so do not expose them. Build your own authenticated file and Git API.
Development mode (Cloud): per-user branch APIs, commit/merge/publish, deep links
- Docs: pages/docs/data-modeling/dev-mode.md
- What it does:
- Each user gets a personal dev branch and dev API endpoints that track the branch and hot-reload. Endpoints are listed under Status → API credentials. An embed session can target a branch with
branchName. - Flow: Save all, then Commit (to the working branch), "Merge into <parent>" (shared branches) or "Publish to <deploy branch>". The default button depends on the branch.
- Pull-request handling: shows "Pull request required" when GitHub branch protection or a ruleset blocks direct push, or when "Allow merging to this branch" is off. Branch protection is polled about every minute.
- Commit messages: an optional AI-written message, generated from the diff against the target branch; falls back to Git's default merge message.
- Sync: "Pull from <branch>" updates from the parent or remote. Conflicts show markers, with Commit & resolve or Don't resolve.
- Deep links:
?branch=<name>&devmode=true. The parameters are stripped after use and do nothing without permission. - CLI-deployed deployments: dev-mode actions never trigger a production build; only
cube deploydoes. - Limitations: no autoscaling and no scheduled refresh on dev APIs.
- Pre-aggregations: dev environments share production's Cube Store. Unchanged pre-aggregations are served from production tables. Changed ones are built on demand, separately. Large dev builds can evict older production tables.
- Each user gets a personal dev branch and dev API endpoints that track the branch and hot-reload. Endpoints are listed under Status → API credentials. An embed session can target a branch with
- Availability: CLOUD-ONLY. The page itself contrasts this with Core's
CUBEJS_DEV_MODE=true, which is an authentication bypass: no JWT verification, unauthenticated Playground endpoints that can mint tokens and overwrite the model and.env, and an SQL API that accepts any credentials whenCUBEJS_SQL_PASSWORDis unset. - Core building blocks to use: one Core instance (or
context_to_app_idplusrepository_factory) per branch.repository_factorycan serve model files from a branch checkout keyed by a security-context claim such asbranch. Combine withschema_versionkeyed to the branch HEAD for hot reload. - To build on Core: a branch-environment orchestrator (Git worktrees plus
repository_factory, or per-branch containers), the commit/merge/publish UI and Git integration (with GitHub branch-protection detection), an LLM for commit messages, and per-branch JWT scoping. Effort: L. - Gotchas:
- Never use Core dev mode as the multi-user dev environment.
- Sharing one Cube Store between dev and production needs separate pre-aggregation schemas or prefixes to avoid evicting production tables.
Visual Model (no-code ERD modeler)
- Docs: pages/docs/data-modeling/visual-modeler.md (also data-model-ide.md)
- What it does:
- Model › Visual Model: a canvas showing cubes as an ERD (pan, zoom, search) and views with their source cubes on the left.
- Cubes: Add Cube, Generate Cube from a table picker, Edit dialog (Dimensions tab with Title, SQL, Type, Format), Add → Dimension / Measure / Access Policy, Relationships tab. Joins can be drawn by dragging between dimensions.
- Views: Add view dialog (base cube, name, title, description, join paths).
- Each dialog has a YAML mode. Editing automatically enters dev mode.
- UI limits:
- cannot edit
meta, segments, hierarchies, refresh keys or folders - cannot add subquery dimensions, custom granularities, drill members, rolling windows or pre-aggregations
- cannot delete cubes or views
- only YAML files without Jinja or dynamic generation are editable
- cannot edit
- It replaces the earlier "Data Graph" feature.
- Availability: CLOUD-ONLY. Plan: Premium and above.
- Core building blocks to use:
/v1/metafor rendering the graph (cubes, joins viaconnectedComponent, members);/playground/db-schemafor table lists. Writing back means generating YAML (there is no Core write API). - To build on Core: a React Flow/ERD canvas, YAML AST round-tripping that preserves comments (e.g.
yamlCST), form dialogs per entity, a DB introspection service, and integration with the IDE and branch system. Effort: L–XL. - Gotchas: round-tripping Jinja or JS models is not feasible; restrict editing to plain YAML as Cloud does.
Content Validator (find broken report and task references)
- Docs: pages/docs/data-modeling/content-validator.md
- What it does:
- Data model → Content Validator tab. It validates in real time on open, with no background job.
- Scope:
- every workbook's draft reports and published dashboard snapshots, checked with the same semantic-SQL parser the report editor uses
- the conditions of scheduled tasks (only when AI is available and only for tasks visible to the user)
- branch-aware: validates against the dev, shared-branch or production model, and names the context in the header
- ignores
publicand access policies; only truly missing members are flagged
- Findings table: Content, State (Draft / Published / Scheduled task), Field, Error (e.g.
No such field "orders.total",No such view "sessions_view"), Status (Missing / May be affected). Search box and All/Draft/Published/Scheduled filters. - In dev mode: a "New" badge and an "Introduced here / Pre-existing" filter. Free-text task instructions that mention a member removed on the branch are flagged "May be affected"; these are hints only and are not counted as broken.
- Fixes:
- draft reports: Open, Replace (searchable picker; "Replace in all affected reports"; a precise rewrite that leaves same-named members of other views alone; persists and re-validates) or Delete (with confirmation)
- published snapshots and tasks: Open only
- tasks can be edited only by their creator, an admin or the "Manage all scheduled tasks" role
- Limits: reports with advanced semantic SQL (WITH clauses, joins, subqueries) get only the missing-view check on FROM and JOIN targets; otherwise they are counted as "N reports could not be checked".
- Availability: CLOUD-ONLY. Evidence: it depends on Cloud workbooks, dashboards and scheduled tasks, and appears only in Cloud UI instructions.
- Core building blocks to use:
/v1/metaof the target model version (the full, unfiltered model: use a privileged JWT orcontext_to_groupsreturning an admin group, because Core filters meta per user)/v1/sqlor SQL API dry-run compilation to validate each saved query- per-branch instances for the diff against production
- To build on Core: a validator service that walks your stored reports, dashboards and tasks (your own storage), checks member and view existence against meta, a member-rename rewrite tool, and a UI. Effort: M (L with the dev-vs-production diff and semantic-SQL parsing).
- Gotchas:
- The validator must see the full model; per-user meta filtering would hide members that exist and make them look broken.
- Saved semantic SQL needs a real SQL parser (e.g. sqlparser-rs) to rewrite references safely.
Pre-aggregations (model reference)
- Docs: pages/reference/data-modeling/pre-aggregations.md (also cubes.md, dimensions.md and calendar-cubes.md notes)
- What it does:
- Types:
rollup(default; additive measures: count, sum, min, max, count_distinct_approx)original_sql(persisted in the source; pairs withuse_original_sql_pre_aggregations)rollup_join(Preview; joins two rollups across data sources; ephemeral, soscheduled_refresh: trueis an error; needs indexes on the join key; the right side is bounded by Cube Store partitions)rollup_lambda(must come first;union_with_source_dataadds real-time data)
- Parameters:
- members:
measures,dimensions,segments - time:
time_dimensionwithgranularity(default or custom), ortime_dimensions[](rollup only; the first entry drives partitioning),partition_granularity(hour to year) - freshness:
refresh_key {every (interval or cron; cron cannot be combined with sql), sql, incremental, update_window},scheduled_refresh(default true; non-scheduled ones are treated as orphans and dropped),build_range_start/end {sql} - matching:
allow_non_strict_date_range_match(default true via env var) indexes [{name, columns (withCUBE.td.daysyntax or), type: aggregate}]
- members:
- Rules and defaults:
- default
refresh_keyisevery: 1 hour, or every 10 s whensqlis set - incremental refresh without
update_windowrefreshes only the last partition - data outside the build range is never returned
- keep total partitions under 500–1,000
- default
- Types:
- Availability: CORE (Cube Store and the refresh worker are part of Core). No plan stated on this page. Cloud adds managed Cube Store tiers; that is outside this slice.
- Core building blocks to use: Cube Store, refresh worker (
CUBEJS_REFRESH_WORKER),scheduled_refresh_contexts, Orchestration API. - To build on Core: nothing for the modeling part.
- Gotchas:
- Pre-aggregations for calendar overrides must name the overridden granularity.
- Aliased joins are not served by the joined cube's pre-aggregations.
Summary table
| Feature | Availability | Plan | Effort to build on Core | Depends on |
|---|---|---|---|---|
| Cubes, members, syntax, naming, references, segments | CORE | — | none | schema-compiler |
| Dimensions (types, case, geo, switch, sub_query, PKs) | CORE | — | none | Tesseract for switch |
| Custom granularities | CORE | — | none | supported data sources |
| Display metadata (format, dynamic format, currency, order) | CORE+CLOUD | — | S (front-end rendering) | /v1/meta, ___format measure |
| Dimension links (URL and dashboard drill-in) | CORE+CLOUD | — | S–M | /v1/meta links, synthetic ___link_*_url dims, own dashboard registry |
| Measures: types, filters, calculated, drill_members | CORE | — | none | — |
| Multi-stage measures (rolling, to_date, time_shift, grain, filter, rank, case) | CORE | — | none | Tesseract (default in 1.8.x) |
| Calendar cubes | CORE | — | none | Tesseract, join aliases |
| Joins incl. aliases, fan/chasm traps | CORE | — | none | Tesseract for alias (v1.8.7+) |
| Views (join_path, view members, folders, default_filters, extends) | CORE | — | none | — |
View meta auto_run and default_ui_filters; CUBEJS_AUTO_RUN_MODE | CLOUD-ONLY (Core passes meta through) | — | S–M | your query-builder UI, relative-date parser |
| Multi-fact views and SQL API view-join merge | CORE | — | none | Tesseract |
| View groups | CORE | — | S (catalog UI) | /v1/meta viewGroups |
| Hierarchies | CORE | — | none (UI in another slice) | /v1/meta |
| Extending cubes and views | CORE | — | none | — |
| Context variables (FILTER_PARAMS, FILTER_GROUP, SQL_UTILS, COMPILE_CONTEXT) | CORE | — | none | Tesseract for segment and time-shift bindings |
| Dynamic models (Jinja/Python, JS asyncModule, memo) | CORE+CLOUD (Jinja Preview is Cloud) | — | S–M (preview tool) | TemplateContext, schema_version |
cube, cube_dbt, lkml2cube packages | CORE | — | none | pip / requirements.txt |
| Security context, query_rewrite, COMPILE_CONTEXT | CORE+CLOUD (Cloud Auth Integration) | — | S | JWT issuer, extend_context |
| Access policies (member, row, conditions, masking) | CORE+CLOUD (user to group and attribute mapping) | — | S–M | context_to_groups, securityContext.cubeCloud.{groups,userAttributes} |
| Access Policies viewer | CLOUD-ONLY | PlaygroundRead permission | M | schema-compiler run offline (cubeEvaluator) |
AI context (description, meta.ai_context) | CORE+CLOUD (agent is Cloud) | — | M (prompt assembly) | /v1/meta, LLM agent |
| Model configuration UI (TZ, limits, timeout, auto-run) | CORE+CLOUD | — | S | env vars, restart orchestration |
| Data Model IDE (editor, branches, change review, generate) | CLOUD-ONLY | Generate model after creation: Premium+ | L | Git service, per-branch instances, /playground/generate-schema |
| Development mode (branch APIs, commit/merge/publish, AI commit message) | CLOUD-ONLY | — | L | repository_factory, context_to_app_id, schema_version, Git, LLM |
| Visual Model (ERD no-code modeler) | CLOUD-ONLY | Premium+ | L–XL | /v1/meta, DB introspection, YAML round-trip, IDE/branches |
| Content Validator | CLOUD-ONLY | — | M (L with branch diff) | stored reports/dashboards/tasks, /v1/meta, SQL parser |
| Pre-aggregations (model reference) | CORE | — | none | Cube Store, refresh worker |
Pages read (42)
- pages/docs/data-modeling/overview.md
- pages/docs/data-modeling/cubes.md
- pages/docs/data-modeling/dimensions.md
- pages/docs/data-modeling/measures.md
- pages/docs/data-modeling/joins.md
- pages/docs/data-modeling/views.md
- pages/docs/data-modeling/view-groups.md
- pages/docs/data-modeling/multi-fact-views.md
- pages/docs/data-modeling/extending-cubes.md
- pages/docs/data-modeling/ai-context.md
- pages/docs/data-modeling/configuration.md
- pages/docs/data-modeling/content-validator.md
- pages/docs/data-modeling/data-model-ide.md
- pages/docs/data-modeling/dev-mode.md
- pages/docs/data-modeling/visual-modeler.md
- pages/docs/data-modeling/access-policies-viewer.md
- pages/docs/data-modeling/data-access-policies.md
- pages/docs/data-modeling/access-control/index.md
- pages/docs/data-modeling/access-control/context.md
- pages/docs/data-modeling/access-control/member-level-security.md
- pages/docs/data-modeling/access-control/row-level-security.md
- pages/docs/data-modeling/concepts/calendar-cubes.md
- pages/docs/data-modeling/concepts/syntax.md
- pages/docs/data-modeling/dynamic/index.md
- pages/docs/data-modeling/dynamic/jinja.md
- pages/docs/data-modeling/dynamic/javascript.md
- pages/docs/data-modeling/dynamic/schema-execution-environment.md
- pages/docs/data-modeling/dynamic/code-reusability-export-and-import.md
- pages/reference/data-modeling/cube.md
- pages/reference/data-modeling/view.md
- pages/reference/data-modeling/view-group.md
- pages/reference/data-modeling/dimensions.md
- pages/reference/data-modeling/measures.md
- pages/reference/data-modeling/joins.md
- pages/reference/data-modeling/segments.md
- pages/reference/data-modeling/hierarchies.md
- pages/reference/data-modeling/pre-aggregations.md
- pages/reference/data-modeling/data-access-policies.md
- pages/reference/data-modeling/context-variables.md
- pages/reference/data-modeling/cube-package.md
- pages/reference/data-modeling/cube_dbt.md
- pages/reference/data-modeling/lkml2cube.md