Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions sml-reference/dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SML supports the following types of dimensions:

Sample `dimension` file:

```
```yaml
unique_name: Store Dimension
object_type: dimension
label: Store Dimension
Expand Down Expand Up @@ -254,6 +254,7 @@ namespace Dimensions{
Boolean exclude_from_dim_agg
Boolean exclude_from_fact_agg
String time_unit
Int constraint_translation_rank
Array~String~ allowed_calcs_for_dma
}
class SecondaryAttribute{
Expand Down Expand Up @@ -1146,6 +1147,14 @@ If the key consists of one column, the values in that column must be
unique. If the key is a compound key, the columns together must provide
unique values.

## constraint_translation_rank

- **Type:** integer
- **Required:** N
- **Range:** should be a valid 32 bit integer

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.

## shared_degenerate_columns

- **Type:** array
Expand Down Expand Up @@ -1176,7 +1185,7 @@ Supported properties:

For example:

```
```yaml
level_attributes:

- unique_name: Order Degen Shared Level
Expand Down
20 changes: 19 additions & 1 deletion sml-reference/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ files. Those defined in model files override their counterparts in

Sample `model` file:

```
```yaml
unique_name: Internet Sales
object_type: model
label: Internet Sales
Expand Down Expand Up @@ -217,6 +217,7 @@ namespace Models{
String role_play
String type
Boolean m2m
ConstraintTranslation constraint_translation
}
class From{
String dataset
Expand All @@ -227,6 +228,10 @@ namespace Models{
String level
String row_security
}
class ConstraintTranslation{
String level
Array~String~ from_columns
}
class Aggregate{
String unique_name
String label
Expand Down Expand Up @@ -390,6 +395,19 @@ marks):
For example, if you wanted to use the prefix **Order**, you would set
`role_play` to `"Order {0}"`.

### constraint_translation

- **Type:** object
- **Required:** N

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.

Supported properties:
- `level`: String, required. Indicates the dimension level to which the constraint translation applies.
- `from_columns`: Array, required. Lists the column(s) in the dataset that should be used for the join.

If the `constraint_translation` property is defined, a corresponding `constraint_translation_rank` must be present in the associated level.

## metrics

- **Type:** array
Expand Down
Loading