diff --git a/README.md b/README.md index e04588f..47ed4c9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/sml-reference/catalog.md b/sml-reference/catalog.md index 422f4f4..1dd6c18 100644 --- a/sml-reference/catalog.md +++ b/sml-reference/catalog.md @@ -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 ``` diff --git a/sml-reference/composite-model.md b/sml-reference/composite-model.md new file mode 100644 index 0000000..80d1b7a --- /dev/null +++ b/sml-reference/composite-model.md @@ -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. +