@@ -12,7 +12,7 @@ files. Those defined in model files override their counterparts in
12
12
13
13
Sample ` model ` file:
14
14
15
- ```
15
+ ``` yaml
16
16
unique_name : Internet Sales
17
17
object_type : model
18
18
label : Internet Sales
@@ -195,6 +195,7 @@ classDiagram
195
195
Aggregate *-- AttributeReference
196
196
Perspective *-- PerspectiveDimension
197
197
PerspectiveDimension *-- PerspectiveHierarchy
198
+ Drillthrough *-- AttributeReferenceDrillthrough
198
199
namespace Models{
199
200
class Model{
200
201
String unique_name
@@ -207,16 +208,16 @@ namespace Models{
207
208
Array~Aggregate~ aggregates
208
209
Array~Perspective~ perspectives
209
210
Array~Drillthrough~ drillthroughs
210
- Array~Partition~ partition
211
+ Array~Partition~ partitions
211
212
Boolean include_default_drillthrough
213
+ Object overrides
212
214
}
213
215
class Relationship{
214
216
String unique_name
215
217
Object from
216
218
Object to
217
219
String role_play
218
220
String type
219
- Boolean m2m
220
221
}
221
222
class From{
222
223
String dataset
@@ -238,13 +239,19 @@ namespace Models{
238
239
String unique_name
239
240
String notes
240
241
Array~String~ metrics
241
- Array~AttributeReference~ attributes
242
+ Array~AttributeReferenceDrillthrough~ attributes
243
+ }
244
+ class AttributeReferenceDrillthrough{
245
+ String name
246
+ String dimension
247
+ Array~String~ relationships_path
242
248
}
243
249
class AttributeReference{
244
250
String name
245
251
String dimension
246
252
String partition
247
253
String distribution
254
+ Array~String~ relationships_path
248
255
}
249
256
class Partition{
250
257
String unique_name
@@ -266,14 +273,12 @@ namespace Models{
266
273
}
267
274
class PerspectiveDimension{
268
275
String name
269
- Boolean visible
270
276
Array~PerspectiveHierarchy~ hierarchies
271
- Array~String~ secondaryattributes
272
- Array~String~ metrics
277
+ Array~String~ secondary_attributes
278
+ Array~String~ relationships_path
273
279
}
274
280
class PerspectiveHierarchy{
275
281
String name
276
- Boolean visible
277
282
Array~String~ levels
278
283
}
279
284
}
@@ -480,18 +485,18 @@ Supported properties:
480
485
- ` name ` : String, required. The name of the dimension to include in the
481
486
perspective.
482
487
483
- - ` prefixes ` : Array, optional.
484
-
485
488
- ` hierarchies ` : Array, optional. A list of the specific hierarchies
486
489
within the ` name ` dimension to include in the perspective. Supported
487
490
properties:
488
- - ` name ` : String, required. The name of the hierarchy.
489
- - ` levels ` : Array, optional. A list of the levels within the
490
- hierarchy to include in the perspective.
491
+ - ` name ` : String, required. The name of the hierarchy.
492
+ - ` levels ` : Array, optional. A list of the levels within the
493
+ hierarchy to include in the perspective.
491
494
492
- - ` secondaryattributes ` : Array, optional. A list of the dimension's
495
+ - ` secondary_attributes ` : Array, optional. A list of the dimension's
493
496
secondary attributes to include in the perspective.
494
497
498
+ - ` relationships_path ` : Array, optional. A list of relationships path.
499
+
495
500
## drillthroughs
496
501
497
502
- ** Type:** array
@@ -545,6 +550,7 @@ Supported properties:
545
550
drillthrough.
546
551
- ` dimension ` : String, optional. The dimension that the attribute
547
552
defined by ` name ` appears in.
553
+ - ` relationships_path ` : Array, optional. A list of relationships path.
548
554
549
555
## aggregates
550
556
@@ -736,3 +742,36 @@ you want to set for it at the model level. For example:
736
742
737
743
dataset1:
738
744
create_hinted_aggregate: true
745
+
746
+ ## overrides
747
+
748
+ - ** Type:** object
749
+ - ** Required:** N
750
+
751
+ The ` overrides ` property in a model file enables the creation of query name overrides for metrics and degenerate dimensions referenced in а model.
752
+ This scenario arises from legacy projects where metrics or dimensions in different models can use the same ` unique_name ` when deployed.
753
+ Since project scope uniqueness is enforced these metrics/dimensions are required have a different ` unique_name ` value in the repo.
754
+ When a model is deployed the overridden ` unique_name ` is replaced by the original value.
755
+ The best practice is to never use the same ` unique_name ` for different objects across models so overrides should only be used when migrating
756
+ from a legacy model and wanting to maintain the same query name for existing interfaces.
757
+
758
+ ** Note:** This applies only for degenerate dimensions, NOT the dimensions part of relationships.
759
+
760
+ - The object key must be a metric or a dimension referenced in the model.
761
+
762
+ ### query_name
763
+
764
+ - ** Type:** string
765
+ - ** Required:** Y
766
+
767
+ The query name that the metric or dimension should be resolved to.
768
+
769
+ Sample ` overrides ` :
770
+
771
+ ``` yaml
772
+ overrides :
773
+ salesamount :
774
+ query_name : deployed query name for metric
775
+ Color Dimension :
776
+ query_name : deployed query name for dimension
777
+ ` ` `
0 commit comments