Skip to content

Commit 8c35bd3

Browse files
feat: update documentation
1 parent de98b39 commit 8c35bd3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

sml-reference/dimension.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SML supports the following types of dimensions:
2929

3030
Sample `dimension` file:
3131

32-
```
32+
```yaml
3333
unique_name: Store Dimension
3434
object_type: dimension
3535
label: Store Dimension
@@ -254,6 +254,7 @@ namespace Dimensions{
254254
Boolean exclude_from_dim_agg
255255
Boolean exclude_from_fact_agg
256256
String time_unit
257+
Int constraint_translation_rank
257258
Array~String~ allowed_calcs_for_dma
258259
}
259260
class SecondaryAttribute{
@@ -1148,14 +1149,12 @@ unique values.
11481149

11491150
## constraint_translation_rank
11501151

1151-
- **Type:** number
1152+
- **Type:** integer
11521153
- **Required:** N
11531154
- **Range:** should be a valid 32 bit integer
11541155

11551156
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.
11561157

1157-
This property must be used in conjunction with the `constraint_translation` property defined in a model relationship.
1158-
11591158
## shared_degenerate_columns
11601159

11611160
- **Type:** array
@@ -1186,7 +1185,7 @@ Supported properties:
11861185

11871186
For example:
11881187

1189-
```
1188+
```yaml
11901189
level_attributes:
11911190

11921191
- unique_name: Order Degen Shared Level

sml-reference/model.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ files. Those defined in model files override their counterparts in
1212

1313
Sample `model` file:
1414

15-
```
15+
```yaml
1616
unique_name: Internet Sales
1717
object_type: model
1818
label: Internet Sales
@@ -217,6 +217,7 @@ namespace Models{
217217
String role_play
218218
String type
219219
Boolean m2m
220+
ConstraintTranslation constraint_translation
220221
}
221222
class From{
222223
String dataset
@@ -227,6 +228,10 @@ namespace Models{
227228
String level
228229
String row_security
229230
}
231+
class ConstraintTranslation{
232+
String level
233+
Array~String~ from_columns
234+
}
230235
class Aggregate{
231236
String unique_name
232237
String label

0 commit comments

Comments
 (0)