Skip to content

Commit

Permalink
Merge pull request #2 from semanticdatalayer/reference-updates
Browse files Browse the repository at this point in the history
adding composite models
  • Loading branch information
kicassidy9 authored Oct 8, 2024
2 parents 13b25c9 + f828bed commit 0548d3a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ as the properties available for each:
- [Calculation](sml-reference/calculation.md) - Defines an expression to combine, evaluate, or manipulate other metrics defined in the model.
- [Dataset](sml-reference/dataset.md) - Defines columns on a physical table or query. Columns can be defined as SQL expressions.
- [Connection](sml-reference/connection.md) - Defines a database and schema for connecting datasets to the physical data platform.
- [Composite Model](sml-reference/composite-model.md) - Defines a model made up of multiple other models.

## Model Library

Expand Down
2 changes: 1 addition & 1 deletion sml-reference/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sample `catalog` file:
unique_name: sml-models
object_type: catalog
label: SML Model Library
as_version: 1.0
version: 1.0
aggressive_agg_promotion: false
build_speculative_aggs: false
```
Expand Down
66 changes: 66 additions & 0 deletions sml-reference/composite-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Composite Model

Composite models are made up of multiple other models that all share a dimension, as well as calculations specific to the composite model itself. They are defined by `composite_model` files in SML.

When you deploy a composite model, all of its referenced objects are deployed as a single model. Note, however, that deployed composite models do not include the following objects from their referenced models:
- User defined aggregates
- Partitions
- Perspectives
- Drill-throughs

Composite model files support the following properties.

## object_type

- **Type:** const
- **Required:** Y

The type of object defined by the file. For composite models, this must be `composite_model`.

## unique_name

- **Type:** string
- **Required:** Y

The unique name of the composite model. This must be unique across all repositories and subrepositories.

## label

- **Type:** string
- **Required:** Y

The name of the composite model as it appears in the consumption tool. This value does not need to be unique.

## models

- **Type:** array
- **Required:** Y

A list of the models that make up the composite model. These must meet the following criteria:

- They cannot be other composite models.
- They must all have at least one dimension in common.


## metrics

- **Type:** array
- **Required:** N

A list of the calculations to include in the composite model. These must meet the following criteria:

- They must be of object type `metric_calc`.
- Each calculation’s MDX formula can only contain references to objects that appear in the referenced models.

The `metrics` property supports the following properties:

- `unique_name`: String, required. The unique name of the calculation.
- `folder`: String, optional. The name of the folder in which this calculation appears in BI tools.

## description

- **Type:** string
- **Required:** N

A description of the composite model.

0 comments on commit 0548d3a

Please sign in to comment.