Dimensions
Dimensions are a node's group-by columns โ the attributes you slice metrics by, authored in Forge and browsed in Context Studio.
When to use it โ Whenever you need a "by" axis: revenue by region, orders by month, returns by category. If a question has a "per" or "by" in it, the answer is a dimension.
Where to find it โ Authored in Forge inside each node's CML; browsed read-only in Context Studio โ Dimensions.
Who can use it โ Weavers and Luminaries author them in Forge; anyone with Context Studio access can browse them.
Every metric needs something to be grouped by, and that is what dimensions are. In a Celiq node they live under the attributes: key in CML, but the product surfaces them everywhere as Dimensions โ the read-only Context Studio Dimensions tab, the node badges, and Discover's group-by picker all use that word. This page covers how dimensions are defined, the small naming drift between CML and the UI, and how the saver decides what counts as a dimension versus a metric.
Overview
A dimension is one entry in a node's attributes array. Each entry describes a single warehouse column you can group, filter, or split a chart by. A dimension carries no aggregation โ it is a raw column value such as a date, a region label, or a status string. Metrics (SUM, COUNT, AVG, โฆ) are the opposite: they roll many rows up into one number. Dimensions and metrics together make a node useful โ metrics are the numbers, dimensions are the axes you read them along.
A single dimension definition supports these properties:
| Property | Required | What it does |
|---|---|---|
name | Yes | The dimension's identifier, used in queries and CML references. |
column | No | The physical warehouse column. Defaults to name if omitted. |
type | No | Data type: string, date, integer, etc. Defaults to string. |
description | No | Plain-language explanation shown to people and to Orion. |
values | No | An enumerated list of expected values (e.g. [US, EU, APAC, LATAM]). |
time_grains | No | For date dimensions: the grains it can be rolled to (day, week, month, quarter, year). |
label | No | A friendly display name. The Dimensions tab shows label when present, otherwise name. |
When to use it
Add a dimension to a node whenever you want to be able to:
- Group by it โ split a chart or table into one row/series per value (revenue by
region). - Filter by it โ narrow results to specific values (
order_status = delivered). - Trend over time โ date dimensions with
time_grainslet you switch a chart between daily, weekly, and monthly buckets. - Give Orion an axis โ the AI layer reads dimension
name,description, andvaluesto understand what it can slice your metrics by.
If the field is something you would aggregate rather than group by โ a revenue total, an order count โ it belongs under metrics, not here. See Metrics.
Concepts
Dimension (attribute). A non-aggregated, group-by column of a node. In CML it is one entry of theattributes array; in the UI it is called a Dimension. The two words mean the same thing โ see the naming note below.
Node. A modelled table (or SQL block) in your semantic layer. Each node owns its own list of dimensions and metrics. Dimensions are scoped to the node that declares them.
Time grain. The bucket a date dimension can be rolled to. Declaring time_grains: [day, week, month, quarter, year] on a date dimension tells Celiq which grains that field supports.
Enumerated values. The values list documents the expected set of values for a dimension (for example the regions or statuses that can appear). It records what the column holds for both people and Orion.
attributes, but the product calls them Dimensions throughout. Context Studio's GET /api/context/dimensions reads every node's content, walks cml.attributes, and flattens each one into a flat record of { node, name, label, type, column }. So attributes: in your YAML is exactly what shows up under the Dimensions tab โ same fields, different word.Getting started
Prerequisites:
- A workspace with at least one node modelled in Forge.
- The Weaver or Luminary role to author or edit a node's CML.
To browse existing dimensions:
- Open Context Studio from the main navigation.
- Select the Dimensions tab.
- You will see every dimension across all nodes, grouped by node, with a filter box to search by field or node name.
To author dimensions, open Forge and edit the node's CML directly.
Step-by-step
Open the node in Forge
Go to Forge and open the node whose dimensions you want to add or change. Dimensions are written into the node's CML.
Add an attributes entry
Under the node, add or extend the attributes: list. Give each dimension a name, and a column if the warehouse column name differs from the dimension name. Add a description so people and Orion know what it means.
Set the type
Give the dimension a type (string, date, integer, โฆ). Type defaults to string when omitted, so set it explicitly for dates and numbers.
Add time grains for dates
For a date dimension, add time_grains to declare which grains it can be rolled to, e.g. time_grains: [day, week, month, quarter, year].
Document the values (optional)
If the column holds a known, small set of values, list them under values (for example regions or statuses). This documents the column for readers and for Orion.
Validate and save through the Check & Save gate
Run Validate, then Check & Save. On save, Celiq normalizes your CML โ it accepts attributes, dimensions, or fields as the source key and folds them all into the canonical attributes array (see Examples).
Confirm in Context Studio
Open Context Studio โ Dimensions and filter by your node name. Your new dimensions appear under that node with their column and type.
Examples
A node from ecommerce.celiq defining its dimensions. Note the date dimension's time_grains and the enumerated values on region and order_status:
tables:
- name: fct_orders
physical_table: DW_PROD.OMS.FCT_ORDERS
description: One row per order. Primary fact table for revenue reporting.
dimensions:
- name: order_date
column: ORDER_DATE
type: date
description: Date the order was placed (not shipped or delivered)
time_grains: [day, week, month, quarter, year]
- name: region
column: SHIPPING_REGION
type: string
description: Geographic region of the shipping address
values: [US, EU, APAC, LATAM]
- name: order_status
column: STATUS
type: string
description: Current order status
values: [pending, confirmed, shipped, delivered, cancelled, returned]
When this saves, the normalizer renames the dimensions: key to the canonical attributes:, leaving the entries unchanged. Context Studio then flattens each attribute into a flat row. For order_date it returns:
{
"node": "fct_orders",
"name": "order_date",
"label": "order_date",
"type": "date",
"column": "ORDER_DATE"
}Because no label was set, the response falls back to name, and the Dimensions tab shows order_date with ORDER_DATE as its column and a date type badge.
Best practices
- Always set a
type. It defaults tostring. Mark dates asdateand numeric group-by columns asintegerso charts, filters, and time-grain controls behave correctly. - Give every dimension a
description. Orion reads these to decide how to slice your metrics, and readers rely on them in Context Studio. - Declare
time_grainson date dimensions. Without them, a date dimension has no documented grains to roll up to. - Use
valuesfor low-cardinality fields. Listing the regions, channels, or statuses a column holds documents the data and helps Orion reason about it. - Add a
columnwhenever it differs fromname. Use a clean, readablenamefor the dimension and pointcolumnat the real warehouse column (e.g.name: region,column: SHIPPING_REGION).
Tips
The Dimensions tab in Context Studio is a fast way to audit your whole semantic layer at a glance โ every group-by field across every node, in one filterable list grouped by node. Use the filter box to check whether a column you expect (say channel) is actually modelled before you go hunting in Forge.
Common mistakes
attributes. If a field's sql contains an aggregate function (SUM, COUNT, AVG, MIN, MAX, COUNT DISTINCT) or it has an intent, the saver treats it as a metric, not a dimension. Such a field is automatically demoted out of attributes and into metrics, and a warning is recorded ("Moved N aggregate field(s) from attributes โ metrics"). If you meant it to be a group-by column, remove the aggregate; if you meant it to be a number, define it under metrics from the start.- Forgetting
typeon a date. A date left as the defaultstringwill not behave as a time dimension. Settype: dateand addtime_grains. - Expecting dimensions to be editable in Context Studio. The Dimensions tab is read-only. All authoring happens in Forge โ the tab's empty state even points you there: "Add attribute fields to nodes in Forge."
- Assuming
columndefaults to something else. If you omitcolumn, it defaults toname. When your warehouse column name differs, you must setcolumnexplicitly or the query will reference the wrong column.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "No dimensions found." in the Dimensions tab | No node has any attributes entries (the tab walks cml.attributes across all nodes). | Add attributes (or dimensions / fields) entries to a node in Forge and save. |
| A field you added shows up under Metrics, not Dimensions | Its sql contains an aggregate function or it has an intent, so the normalizer demoted it from attributes to metrics. | Remove the aggregate from sql (and any intent) if it should be a group-by column. |
| The Dimensions tab shows the field name instead of a friendly label | No label was set, so the response falls back to name. | Add a label to the dimension in CML. |
| The dimension points at the wrong warehouse column | column was omitted, so it defaulted to name, which doesn't match the real column. | Set column to the actual warehouse column name. |
| A date dimension can't be rolled to weeks/months | No time_grains declared, or type is not date. | Set type: date and add time_grains: [day, week, month, quarter, year]. |
Your dimensions: or fields: key seems to have "disappeared" after save | On save the normalizer renames dimensions and fields to the canonical attributes (recording a "Renamed โฆ โ attributes" warning). | Expected behavior โ read the saved CML; your entries are under attributes. |