Skip to content

Commit 01d7f27

Browse files
Merge branch 'main' into ATSCALE-27344-perspective-levels
2 parents b3e28d5 + c493403 commit 01d7f27

File tree

2 files changed

+88
-26
lines changed

2 files changed

+88
-26
lines changed

sml-reference/dimension.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ namespace Dimensions{
269269
Boolean is_aggregatable
270270
Boolean exclude_from_fact_agg
271271
String time_unit
272+
Int constraint_translation_rank
272273
Array~String~ allowed_calcs_for_dma
273274
CustomEmptyMember custom_empty_member
274275
String folder
@@ -308,12 +309,15 @@ namespace Dimensions{
308309
String label
309310
String description
310311
String folder
312+
Number precedence
311313
Array~CalculatedMembers~ calculated_members
314+
Boolean is_hidden
312315
}
313316
class CalculatedMembers{
314317
String unique_name
315318
String description
316319
String format
320+
Boolean is_hidden
317321
String expression
318322
Boolean use_input_metric_format
319323
String template
@@ -541,13 +545,36 @@ Defines the individual calculated members in the group.
541545

542546
A description of the calculation group.
543547

548+
## is_hidden
549+
550+
- **Type:** boolean
551+
- **Required:** N
552+
553+
Determines whether the calculation group is visible in BI tools.
554+
555+
Supported values:
556+
557+
- `false` (default)
558+
- `true`
559+
544560
## folder
545561

546562
- **Type:** string
547563
- **Required:** N
548564

549565
The name of the folder in which the calculation group is displayed in BI tools.
550566

567+
## precedence
568+
569+
- **Type:** number
570+
- **Required:** N
571+
572+
Update to "Precedence" explicitly defines the order of Calculation Group evaluation, making it consistent across BI tools.
573+
574+
Supported values:
575+
576+
- Integer and floating point numbers
577+
551578
# Calculated Members Properties
552579

553580
## unique_name
@@ -577,6 +604,18 @@ Supported templates:
577604

578605
If you do not want to use a built-in template, you can define a custom expression using the `expression` property (see below).
579606

607+
## is_hidden
608+
609+
- **Type:** boolean
610+
- **Required:** N
611+
612+
Determines whether the attribute is visible in BI tools.
613+
614+
Supported values:
615+
616+
- `false` (default)
617+
- `true`
618+
580619
## expression
581620

582621
- **Type:** string
@@ -1188,6 +1227,14 @@ If the key consists of one column, the values in that column must be
11881227
unique. If the key is a compound key, the columns together must provide
11891228
unique values.
11901229

1230+
## constraint_translation_rank
1231+
1232+
- **Type:** integer
1233+
- **Required:** N
1234+
- **Range:** should be a valid 32 bit integer
1235+
1236+
Defines the translation of dimension filter constraints into fact table partition column constraints. This can significantly improve query performance for cases where fact-based aggregates are not used.
1237+
11911238
## shared_degenerate_columns
11921239

11931240
- **Type:** array

sml-reference/model.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ label: Internet Sales
1919
visible: true
2020

2121
relationships:
22-
2322
- unique_name: factinternetsales_Date_Dimension_Order
2423
from:
2524
dataset: factinternetsales
@@ -116,7 +115,6 @@ dimensions:
116115
- Weight
117116

118117
metrics:
119-
120118
- unique_name: orderquantity
121119
folder: Sales Metrics
122120

@@ -135,10 +133,8 @@ perspectives:
135133
- d_lastname
136134

137135
drillthroughs:
138-
139136
- unique_name: Customer Details
140137
attributes:
141-
142138
- name: State
143139
dimension: Geography Dimension
144140

@@ -157,7 +153,6 @@ drillthroughs:
157153

158154
- unique_name: Shipping Details
159155
attributes:
160-
161156
- name: Size
162157
dimension: Size Dimension
163158

@@ -217,6 +212,7 @@ namespace Models{
217212
Object to
218213
String role_play
219214
String type
215+
ConstraintTranslation constraint_translation
220216
}
221217
class From{
222218
String dataset
@@ -227,6 +223,10 @@ namespace Models{
227223
String level
228224
String row_security
229225
}
226+
class ConstraintTranslation{
227+
String level
228+
Array~String~ from_columns
229+
}
230230
class Aggregate{
231231
String unique_name
232232
String label
@@ -395,6 +395,20 @@ marks):
395395
For example, if you wanted to use the prefix **Order**, you would set
396396
`role_play` to `"Order {0}"`.
397397

398+
### constraint_translation
399+
400+
- **Type:** object
401+
- **Required:** N
402+
403+
Defines the translation of dimension filter constraints into fact table partition column constraints. This can significantly improve query performance for cases where fact-based aggregates are not used.
404+
405+
Supported properties:
406+
407+
- `level`: String, required. Indicates the dimension level to which the constraint translation applies.
408+
- `from_columns`: Array, required. Lists the column(s) in the dataset that should be used for the join.
409+
410+
If the `constraint_translation` property is defined, a corresponding `constraint_translation_rank` must be present in the associated level.
411+
398412
## metrics
399413

400414
- **Type:** array
@@ -440,7 +454,7 @@ analysts with the entire data model, you can make specific dimensions,
440454
hierarchies, levels, secondary attributes, measures, and calculated
441455
measures invisible to them.
442456

443-
**Note:** We recommend that you add perspectives *after* a model has
457+
**Note:** We recommend that you add perspectives _after_ a model has
444458
been fully tested. Although you can edit a model after adding
445459
perspectives, any changes might require you to update the perspectives
446460
to hide new objects that would otherwise be visible to all users.
@@ -476,9 +490,9 @@ perspective.
476490
A list of the specific dimensions and their hierarchies to be hidden in the
477491
perspective.
478492

479-
By default, all objects within a dimension are visible. The lowest granularity objects specified are
480-
hidden and the objects above it are not. Hiding a level in a hierarchy hides all levels below it.
481-
Hiding a hierarchy hides all levels in it. Hiding a dimension hides all objects within it including hierarchies
493+
By default, all objects within a dimension are visible. The lowest granularity objects specified are
494+
hidden and the objects above it are not. Hiding a level in a hierarchy hides all levels below it.
495+
Hiding a hierarchy hides all levels in it. Hiding a dimension hides all objects within it including hierarchies
482496
and secondary attributes. If a dimension is not hidden, secondary attributes can be hidden individually.
483497

484498
Supported properties:
@@ -488,9 +502,10 @@ Supported properties:
488502

489503
- `hierarchies`: Array, optional. A list of the specific hierarchies
490504
within the dimension to hide in the perspective. Supported properties:
491-
- `name`: String, required. The name of the hierarchy.
492-
- `level`: String, optional. Defines a single level in the hierarchy to be hidden in the perspective. All levels below the specified level will also be hidden.
493-
- `levels`: Array, optional. ⚠️ **DEPRECATED** use `level` instead.
505+
506+
- `name`: String, required. The name of the hierarchy.
507+
- `level`: String, optional. Defines a single level in the hierarchy to be hidden in the perspective. All levels below the specified level will also be hidden.
508+
- `levels`: Array, optional. ⚠️ **DEPRECATED** use `level` instead.
494509

495510
- `secondary_attributes`: Array, optional. A list of the dimension's
496511
secondary attributes to hide in the perspective.
@@ -644,22 +659,22 @@ Supported properties:
644659
determines whether it should be defined on the key column, name
645660
column, or both. Supported values: `name`, `key`, `name+key`
646661

647-
When the engine builds an instance of this aggregate, it creates
648-
a partition for each combination of values in the dimensional
649-
attributes. The number of partitions depends on the
650-
left-to-right order of the attributes, as well as the number of
651-
values for each attribute.
662+
When the engine builds an instance of this aggregate, it creates
663+
a partition for each combination of values in the dimensional
664+
attributes. The number of partitions depends on the
665+
left-to-right order of the attributes, as well as the number of
666+
values for each attribute.
652667

653-
Essentially, the partitioning key functions as a `GROUP BY`
654-
column. Queries against the aggregate must use this dimensional
655-
attribute in a `WHERE` clause. A good candidate for a
656-
partitioning key is a set of dimensional attributes that
657-
together have a few hundred to under 1000 value combinations.
668+
Essentially, the partitioning key functions as a `GROUP BY`
669+
column. Queries against the aggregate must use this dimensional
670+
attribute in a `WHERE` clause. A good candidate for a
671+
partitioning key is a set of dimensional attributes that
672+
together have a few hundred to under 1000 value combinations.
658673

659674
- `distribution`: String, optional. The distribution keys to use when
660675
creating the aggregate table. If your aggregate data warehouse
661676
supports distribution keys, then the semantic engine uses the specified keys when
662-
creating the aggregate table.
677+
creating the aggregate table.
663678

664679
## partitions
665680

@@ -734,7 +749,7 @@ Supported properties:
734749
- `allow_peer_aggs`: Boolean, optional. Enables aggregation on data
735750
derived from datasets in data warehouses that are different from the
736751
source dataset.
737-
- `allow_preferred_aggs`: Boolean, optional. Allow aggregates to be built
752+
- `allow_preferred_aggs`: Boolean, optional. Allow aggregates to be built
738753
in preferred storage.
739754
- `create_hinted_aggregate`: Boolean, options. Enables the creation of
740755
hinted aggregates for the dataset.
@@ -772,8 +787,8 @@ Sample `overrides`:
772787

773788
```yaml
774789
overrides:
775-
salesamount:
790+
salesamount:
776791
query_name: deployed query name for metric
777792
Color Dimension:
778793
query_name: deployed query name for dimension
779-
```
794+
```

0 commit comments

Comments
 (0)