You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/product/data-modeling/recipes/designing-metrics.mdx
+9-33Lines changed: 9 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
-
# Designing Metrics
1
+
# Designing metrics
2
2
3
-
Cube is a dataset-centric semantic layer, where all primary objects, cubes and views, are table-like datasets.
4
-
When designing how your semantic layer will be exposed and consumed by end users, you can follow either entity-first approach or metrics-first.
5
-
In both cases, views will be used to build the semantic layer interface.
3
+
Cube is a dataset-centric semantic layer, where all primary objects (cubes and views)
4
+
are table-like datasets. When designing how your semantic layer will be exposed and
5
+
consumed by end users, you can follow either an [entity-first](#entity-first-approach)
6
+
or a [metrics-first](#metrics-first-approach) approach.
6
7
7
-
## Entity-first
8
+
## Entity-first approach
8
9
9
10
In entity-first approach, views are built around entities in your data model.
10
11
Views are built as denormalzied tables, bringing measures and dimensions from different cubes needed to fully decscribe the entity.
@@ -83,7 +84,8 @@ views:
83
84
Views are exposed as tables in Cube SQL API, dimensions can be queried as is
84
85
85
86
86
-
## Metrics-first
87
+
## Metrics-first approach
88
+
87
89
In metrics-first approach, views are built around measures, or metrics, in your data model.
88
90
Views are built as denormalzied tables, containing one measure and all the relevant dimensions from different cubes. These include all the dimensions you would group or filter by, and up to one time dimension.
89
91
Views are usually named after that single measure.
@@ -141,30 +143,4 @@ views:
141
143
142
144
- status
143
145
- shipped_at
144
-
```
145
-
146
-
## Integrations with BI Tools
147
-
Some metrics-based BI tools will specify requirements for the views or be able to accept additional metadata to enrich the experience.
148
-
Below is an example of using the `meta` property to do this.
149
-
150
-
```yaml
151
-
views:
152
-
- name: order_count_by_order_date
153
-
description: For finance team to track orders on accrual/earned basis.
0 commit comments