Skip to content

Commit 9fa42e5

Browse files
committed
All the rest
1 parent f1484fe commit 9fa42e5

File tree

11 files changed

+209
-57
lines changed

11 files changed

+209
-57
lines changed

docs/pages/guides/style-guide.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ cube_project
7373
- `pre_aggregations`
7474
- `joins`
7575
- `dimensions`
76+
- `hierarchies`
77+
- `segments`
7678
- `measures`
7779

7880
### Dimensions & measures
@@ -136,8 +138,9 @@ cubes:
136138
- Applicable [view parameters][ref-view-params] should be ordered as follows:
137139
- `name`
138140
- `description`
139-
- `includes`
141+
- `public`
140142
- `cubes`
143+
- `folders`
141144

142145
### Example view
143146

@@ -316,7 +319,7 @@ cube(`users`, {
316319

317320
This style guide was inspired in part by:
318321

319-
- [Brooklyn Data' SQL style guide](https://github.com/brooklyn-data/co/blob/main/sql_style_guide.md)
322+
- [Brooklyn Data Co. SQL style guide](https://github.com/brooklyn-data/co/blob/main/sql_style_guide.md)
320323
- [LAMS Style Guide](https://looker-open-source.github.io/look-at-me-sideways/rules.html)
321324

322325
[cpn]: https://cube.dev/consulting/cube-partner-network

docs/pages/product/apis-integrations.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ for an unofficial, community-maintained [client library for Python](https://gith
4848

4949
</ReferenceBox>
5050

51+
### Support for data modeling
52+
53+
Support for data modeling features differ across APIs, integrations, and [visualization
54+
tools][ref-viz-tools]. Some of the features with partial support are listed below:
55+
56+
| Feature | Supported in | Not supported in |
57+
| --- | --- | --- |
58+
| [Hierarchies][ref-hierarchies] |[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls]<br/>✅ Cube Cloud for Excel<br/>✅ [Cube Cloud for Sheets][ref-cube-cloud-for-sheets] | ❌ All other tools |
59+
| [Folders][ref-folders] |[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls]<br/>✅ Cube Cloud for Excel<br/>✅ [Cube Cloud for Sheets][ref-cube-cloud-for-sheets] | ❌ All other tools |
60+
5161
## Management APIs
5262

5363
In case you'd like Cube to work with data orchestration tools and let them push
@@ -69,4 +79,8 @@ API][ref-orchestration-api].
6979
[ref-sql-syntax]: /product/apis-integrations/sql-api#querying-fundamentals
7080
[ref-json-syntax]: /product/apis-integrations/rest-api/query-format
7181
[ref-graphql-syntax]: /product/apis-integrations/graphql-api#getting-started
72-
[ref-cube-cloud-for-sheets]: /product/apis-integrations/google-sheets
82+
[ref-cube-cloud-for-sheets]: /product/apis-integrations/google-sheets
83+
[ref-viz-tools]: /product/configuration/visualization-tools
84+
[ref-hierarchies]: /reference/data-model/hierarchies
85+
[ref-folders]: /reference/data-model/view#folders
86+
[ref-tableau]: /product/configuration/visualization-tools/tableau

docs/pages/product/apis-integrations/mdx-api.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ views:
6060
- city
6161
```
6262
63+
<InfoBox>
64+
65+
For historical reasons, the syntax shown above differ from how
66+
[hierarchies][ref-hierarchies] are supposed to be defined in the data model.
67+
This is going to be harmonized in the future.
68+
69+
</InfoBox>
70+
6371
### Dimension keys
6472
6573
You can define a member that will be used as a key for a dimension in the cube's model file.
@@ -143,6 +151,18 @@ views:
143151
- completed_percentage
144152
```
145153
154+
<InfoBox>
155+
156+
For historical reasons, the syntax shown above differ from how
157+
[folders][ref-folders] are supposed to be defined in the data model.
158+
This is going to be harmonized in the future.
159+
160+
</InfoBox>
161+
146162
## Authentication and authorization
147163
148164
Authentication and authorization work the same as for the [SQL API](/product/apis-integrations/sql-api/security).
165+
166+
167+
[ref-hierarchies]: /reference/data-model/hierarchies
168+
[ref-folders]: /reference/data-model/view#folders

docs/pages/product/caching/matching-pre-aggregations.mdx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ If you don't know why a query doesn't match a pre-aggregation, check
2121

2222
## Eligible pre-aggregations
2323

24-
Cube will search for matching pre-aggregations in all cubes that define
25-
members in the query.
26-
27-
Pre-aggregations are tested in the order they are defined in the data model
24+
Cube goes through the following steps to determine if there are any pre-aggregations
25+
matching a query:
26+
- **Members (e.g., dimensions, measures, etc.) are extracted from the query.**
27+
If the query contains members of a [view][ref-views], they are substituted by
28+
respective members of cubes where they are defined. It means that pre-aggregations
29+
defined for cube members would also match queries with view members. There's no need
30+
to define additional pre-aggregations for views.
31+
- Cube looks for pre-aggregations in all cubes that define members in the query.
32+
- Pre-aggregations are tested in the order they are defined in the data model
2833
file. However, `rollup` pre-aggregations are tested before `original_sql`
2934
pre-aggregations.
30-
31-
The first pre-aggregation that matches a query is used.
35+
- The first pre-aggregation that [matches](#matching-algorithm) a query is used.
3236

3337
## Matching algorithm
3438

@@ -129,4 +133,5 @@ configuration option.
129133
[ref-conf-scheduled-refresh-time-zones]: /reference/configuration/config#scheduled_refresh_time_zones
130134
[ref-ungrouped-queries]: /product/apis-integrations/queries#ungrouped-query
131135
[ref-primary-key]: /reference/data-model/dimensions#primary_key
132-
[ref-custom-granularity]: /reference/data-model/dimensions#granularities
136+
[ref-custom-granularity]: /reference/data-model/dimensions#granularities
137+
[ref-views]: /product/data-modeling/concepts#views

docs/pages/product/data-modeling/concepts.mdx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ redirect_from:
55

66
# Concepts
77

8-
Cube borrows a lot of terminology from data science and [OLAP
8+
Cube borrows a lot of terminology from [OLAP
99
theory][wiki-olap], and this document is intended for both newcomers and regular
1010
users to refresh their understanding.
1111

@@ -109,8 +109,10 @@ paths.
109109
110110
<Diagram src="https://ucarecdn.com/bfc3e04a-b690-40bc-a6f8-14a9175fb4fd/" />
111111
112-
Views can **not** have their own members. Instead, use the `cubes` or `includes`
113-
parameters to include measures and dimensions from other cubes into the view.
112+
Views can **not** have their own members. Instead, they use the `cubes`
113+
parameter to include members of cubes. Optionally, you can also group members of a view
114+
into [folders][ref-ref-folders].
115+
114116
In the example below, we create the `orders` view which includes select members
115117
from `base_orders`, `products`, and `users` cubes:
116118

@@ -178,7 +180,7 @@ views:
178180
</CodeTabs>
179181
180182
Views do **not** define any [pre-aggregations](#pre-aggregations). Instead,
181-
they reuse pre-aggregations from underlying cubes.
183+
they [reuse][ref-matching-preaggs] pre-aggregations from underlying cubes.
182184
183185
View may not only be defined statically; you can actually build
184186
[dynamic data models][ref-dynamic-data-models].
@@ -282,7 +284,9 @@ cubes:
282284
283285
</CodeTabs>
284286
285-
Also, [subquery dimensions][ref-subquery-dimensions] can be used to join cubes
287+
If needed, dimensions can be organized into [hierarchies][ref-ref-hierarchies].
288+
Also, [proxy dimensions][ref-proxy-dimensions] are helpful for code reusability
289+
and [subquery dimensions][ref-subquery-dimensions] can be used to join cubes
286290
implicitly.
287291
288292
### Dimension types
@@ -434,6 +438,9 @@ cubes:
434438
435439
</CodeTabs>
436440
441+
Also, [calculated measures][ref-calculated-measures] can be used to perform calculations
442+
on other measures.
443+
437444
### Measure types
438445
439446
Measures can be of different types. See the [measure type
@@ -719,6 +726,7 @@ Pre-Aggregations][ref-caching-preaggs-intro].
719726
[ref-polymorphic-cubes]: /product/data-modeling/concepts/polymorphic-cubes
720727
[ref-data-blending]: /product/data-modeling/concepts/data-blending
721728
[ref-dynamic-data-models]: /product/data-modeling/dynamic
729+
[ref-proxy-dimensions]: /product/data-modeling/concepts/calculated-members#proxy-dimensions
722730
[ref-subquery-dimensions]: /product/data-modeling/concepts/calculated-members#subquery-dimensions
723731
[ref-working-with-joins]: /product/data-modeling/concepts/working-with-joins
724732
[self-dimensions]: #dimensions
@@ -735,4 +743,6 @@ Pre-Aggregations][ref-caching-preaggs-intro].
735743
[ref-ref-dimension-granularities]: /reference/data-model/dimensions#granularities
736744
[ref-ref-primary-key]: /reference/data-model/dimensions#primary_key
737745
[ref-custom-granularity-recipe]: /guides/recipes/data-modeling/custom-granularity
738-
[ref-proxy-granularity]: /product/data-modeling/concepts/calculated-members#time-dimension-granularity
746+
[ref-proxy-granularity]: /product/data-modeling/concepts/calculated-members#time-dimension-granularity
747+
[ref-ref-hierarchies]: /reference/data-model/hierarchies
748+
[ref-ref-folders]: /reference/data-model/view#folders

docs/pages/product/workspace/playground.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ on a cube or a view to view a list of its members.
4242
src="https://ucarecdn.com/08d5cc69-431d-43d9-8da4-804029adf1fa/"
4343
/>
4444

45-
Measures, dimensions, and segments are shown using distinct colors. If a member has
45+
Members of cubes and views (i.e., measures, dimensions, hierarchies, etc.) are shown
46+
using distinct colors and icons. If a member has
4647
a [title][ref-data-model-title] or a [description][ref-data-model-description] set
4748
in the data model, they will be shown in a tooltip. If a member is not
4849
[public][ref-data-model-public], you will see a lock sign next to it.

docs/pages/reference/data-model/dimensions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `dimensions` property contains a set of dimensions. You can think about a
1010
dimension as an attribute related to a measure, e.g. the measure `user_count`
1111
can have dimensions like `country`, `age`, `occupation`, etc.
1212

13-
Any dimension should have the following properties: `name`, `sql` and `type`.
13+
Any dimension should have the following parameters: `name`, `sql` and `type`.
1414

1515
Dimensions can be also organized into [hierarchies][ref-ref-hierarchies].
1616

docs/pages/reference/data-model/hierarchies.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ The `hierarchies` property contains a set of hierarchies. You can think about a
44
hierarchy as a means to group [dimensions][ref-ref-dimensions] together and organize
55
then into levels of granularity, allowing users to drill down or roll up for analysis.
66

7-
Any hierarchy should have the following properties: [`name`](#name) and [`levels`](#levels).
7+
<InfoBox>
8+
9+
Hierarchies display is subject to support in [visualization tools][ref-viz-tools].
10+
Check [APIs & Integrations][ref-apis] for details.
11+
You can also preview hierarchies in [Playground][ref-playground].
12+
13+
</InfoBox>
14+
15+
Any hierarchy should have the following parameters: [`name`](#name) and [`levels`](#levels).
816

917
## Parameters
1018

@@ -291,4 +299,7 @@ cubes:
291299
292300
293301
[ref-ref-dimensions]: /reference/data-model/dimensions
294-
[ref-naming]: /product/data-modeling/syntax#naming
302+
[ref-naming]: /product/data-modeling/syntax#naming
303+
[ref-apis]: /product/apis-integrations#support-for-data-modeling
304+
[ref-playground]: /product/workspace/playground#viewing-the-data-model
305+
[ref-viz-tools]: /product/configuration/visualization-tools

docs/pages/reference/data-model/measures.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redirect_from:
99
The `measures` parameter contains a set of measures and each measure is an
1010
aggregation over a certain column in your database table.
1111

12-
Any measure should have the following properties: `name`, `sql` and `type`.
12+
Any measure should have the following parameters: `name`, `sql` and `type`.
1313

1414
## Parameters
1515

0 commit comments

Comments
 (0)