-
Notifications
You must be signed in to change notification settings - Fork 62
/
Analytics.xml
302 lines (289 loc) · 16.7 KB
/
Analytics.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml">
<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Alias="Validation" Namespace="Org.OData.Validation.V1" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Hierarchy.xml">
<edmx:Include Namespace="com.sap.vocabularies.Hierarchy.v1" Alias="Hierarchy" />
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.sap.vocabularies.Analytics.v1" Alias="Analytics">
<Annotation Term="Core.Description">
<String>Terms for annotating analytical resources</String>
</Annotation>
<Annotation Term="Core.Description" Qualifier="Published">
<String>2017-02-15 © Copyright 2013 SAP AG. All rights reserved</String>
</Annotation>
<Annotation Term="Core.Links">
<Collection>
<Record>
<PropertyValue Property="rel" String="latest-version" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/Analytics.xml" />
</Record>
<Record>
<PropertyValue Property="rel" String="alternate" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/Analytics.json" />
</Record>
<Record>
<PropertyValue Property="rel" String="describedby" />
<PropertyValue Property="href" String="https://github.com/sap/odata-vocabularies/blob/main/vocabularies/Analytics.md" />
</Record>
</Collection>
</Annotation>
<Term Name="Dimension" Type="Core.Tag" BaseTerm="Aggregation.Groupable" Nullable="false" DefaultValue="true" AppliesTo="Property">
<Annotation Term="Core.Revisions">
<Collection>
<Record>
<PropertyValue Property="Kind" EnumMember="Core.RevisionKind/Deprecated" />
<PropertyValue Property="Description" String="Deprecated in favor of [`AnalyticalContext/Dimension`](#AnalyticalContext)" />
</Record>
</Collection>
</Annotation>
<Annotation Term="Core.Description" String="A property holding the key of a dimension in an analytical context" />
</Term>
<Term Name="Measure" Type="Core.Tag" BaseTerm="Aggregation.Aggregatable" Nullable="false" DefaultValue="true" AppliesTo="Property">
<Annotation Term="Core.Revisions">
<Collection>
<Record>
<PropertyValue Property="Kind" EnumMember="Core.RevisionKind/Deprecated" />
<PropertyValue Property="Description" String="Deprecated in favor of [`AnalyticalContext/Measure`](#AnalyticalContext)" />
</Record>
</Collection>
</Annotation>
<Annotation Term="Core.Description" String="A property holding the numeric value of a measure in an analytical context" />
</Term>
<Term Name="AccumulativeMeasure" BaseTerm="Analytics.Measure" Type="Core.Tag" Nullable="false" DefaultValue="true">
<Annotation Term="Core.Revisions">
<Collection>
<Record>
<PropertyValue Property="Kind" EnumMember="Core.RevisionKind/Deprecated" />
<PropertyValue Property="Description" String="Deprecated in favor of [`AnalyticalContext/AccumulativeMeasure`](#AnalyticalContext)" />
</Record>
</Collection>
</Annotation>
<Annotation Term="Core.Description" String="The measure has non-negative and additive values; it can be used in whole-part charts, e.g. the Donut" />
</Term>
<Term Name="RolledUpPropertyCount" Type="Edm.Int16" Nullable="false">
<!-- instance annotation -->
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Number of properties in the entity instance that have been aggregated away" />
</Term>
<Term Name="DrillURL" Type="Edm.String" AppliesTo="EntityType" Nullable="false">
<!-- metadata annotation that can also appear as instance annotation -->
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description">
<String>
URL to retrieve more detailed data related to a node of a recursive hierarchy.
Annotations with this term MUST include a qualifier to select the hierarchy for which the drill URL is provided.
</String>
</Annotation>
<Annotation Term="Core.IsURL" />
</Term>
<Term Name="PlanningAction" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="ActionImport">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description">
<String> Processes or generates plan data. Its logic may have side-effects on entity sets.
</String>
</Annotation>
</Term>
<Term Name="AggregatedProperties" Type="Collection(Analytics.AggregatedPropertyType)" Nullable="false" AppliesTo="EntityType">
<Annotation Term="Core.Revisions">
<Collection>
<Record>
<PropertyValue Property="Kind" EnumMember="Core.RevisionKind/Deprecated" />
<PropertyValue Property="Description" String="Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty)" />
</Record>
</Collection>
</Annotation>
<Annotation Term="Core.Description" String="Dynamic properties for aggregate expressions with specified aggregation method defined on the annotated entity type." />
<Annotation Term="Core.LongDescription">
<String>
Other annotations may refer in property paths to dynamic properties declared in any AgrgegatedProperties annotation of the
given entity type to leverage the results of the aggregate expression determined in the context of an entity collection of
the annotated type.
</String>
</Annotation>
</Term>
<Term Name="AggregatedProperty" Type="Analytics.AggregatedPropertyType" Nullable="false" AppliesTo="EntityType">
<Annotation Term="Core.Description" String="Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type." />
</Term>
<ComplexType Name="AggregatedPropertyType">
<Property Name="Name" Type="Core.SimpleIdentifier" Nullable="false">
<Annotation Term="Core.Description" String="Name of the dynamic property holding the aggregated value." />
</Property>
<Property Name="AggregationMethod" Type="Aggregation.AggregationMethod" Nullable="false">
<Annotation Term="Core.Description" String="Name of the standard or custom aggregation method to be applied." />
</Property>
<Property Name="AggregatableProperty" Type="Edm.PropertyPath" Nullable="false">
<Annotation Term="Core.Description" String="Property whose values shall be aggregated." />
</Property>
<Annotation Term="Validation.ApplicableTerms">
<Collection>
<String>Common.Label</String> <!-- more in the future as needed -->
</Collection>
</Annotation>
</ComplexType>
<Term Name="AnalyticalContext" Type="Collection(Analytics.AnalyticalContextType)" Nullable="false" AppliesTo="Collection">
<Annotation Term="Core.AppliesViaContainer" />
<Annotation Term="Core.Description" String="Collection of properties that define an analytical context" />
</Term>
<ComplexType Name="AnalyticalContextType">
<Annotation Term="Core.Description" String="Exactly one of `Property` and `DynamicProperty` must be present" />
<Property Name="Property" Type="Edm.PropertyPath">
<Annotation Term="Core.Description" String="Property that is part of the analytical context" />
</Property>
<Property Name="DynamicProperty" Type="Edm.AnnotationPath">
<Annotation Term="Core.Description" String="Dynamic property introduced by annotations that is part of the analytical context" />
<Annotation Term="Validation.AllowedTerms">
<Collection>
<String>Analytics.AggregatedProperty</String>
<String>Aggregation.CustomAggregate</String>
</Collection>
</Annotation>
</Property>
<Property Name="Dimension" Type="Core.Tag" Nullable="false" DefaultValue="true">
<Annotation Term="Core.Description" String="The property holds the key of a dimension" />
</Property>
<Property Name="Measure" Type="Core.Tag" Nullable="false" DefaultValue="true">
<Annotation Term="Core.Description" String="The property holds the numeric value of a measure" />
</Property>
<Property Name="AccumulativeMeasure" Type="Core.Tag" Nullable="false" DefaultValue="true">
<Annotation Term="Core.Description" String="The measure has non-negative and additive values; it can be used in whole-part charts, e.g. the Donut" />
</Property>
</ComplexType>
<Annotations Target="Aggregation.CustomAggregate">
<Annotation Term="Validation.ApplicableTerms">
<Annotation Term="Core.Description" String="Adding a list of other terms that can be annotated to it." />
<Collection>
<String>Common.Label</String> <!-- more in the future as needed -->
</Collection>
</Annotation>
</Annotations>
<Function Name="AutoExpand" IsBound="true" EntitySetPath="InputSet">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties" />
<Annotation Term="Core.LongDescription">
<String>Example transformation sequence:
filter on columns `Industry`, `Amount` and `Currency`,
order by `Amount` descending,
expand 2 levels, with two exceptions
```
$apply=filter(Industry in ('IT','AI'))
/groupby((Country,Region,Segment,Industry),
filter($these/aggregate(Amount) gt 0 and
$these/aggregate(Currency) ne null))
/concat(
groupby((Country,Region,Segment,Industry))
/aggregate($count as LeavesCount),
aggregate(Amount,Currency),
Analytics.AutoExpand(
Levels=[{"P":["Country","CountryName"]},
{"P":["Region","RegionName"]},
{"P":["Segment","Industry"]}],
Aggregation=["Amount","Currency"],
SiblingOrder=[{"Property":"Amount","Order":"desc"}],
ExpandLevels=2,
ExpandEntries=[{"Entry":["US","USA"],"Levels":0},
{"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]
)/concat(aggregate($count as ResultEntriesCount),
skip(20)/top(10)))
```
</String>
</Annotation>
<Parameter Name="InputSet" Type="Collection(Edm.EntityType)" Nullable="false">
<Annotation Term="Core.Description" String="Entity set to be processed" />
</Parameter>
<Parameter Name="Levels" Type="Collection(Analytics.AutoExpandLevel)" Nullable="false">
<Annotation Term="Core.Description" String="Collection of aggregation levels forming a leveled hierarchy" />
<Annotation Term="Core.LongDescription">
<String>Each element in the collection defines the properties that constitute one level.
A property must not referenced by more than one level.
The first element in the collection defines the property names of the coarsest level,
the following elements define the property names of consecutively finer-grained aggregation levels.
The function result is the leveled hierarchy with these levels in preorder,
entries on the finest-grained level cannot be expanded further.
All referenced properties must be groupable.</String>
</Annotation>
</Parameter>
<Parameter Name="Aggregation" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="Properties to aggregate for all result entries on all levels" />
<Annotation Term="Core.LongDescription">
<String>All properties in this collection must be custom aggregates.</String>
</Annotation>
</Parameter>
<Parameter Name="SiblingOrder" Type="Collection(Analytics.AutoExpandSiblingOrder)" Nullable="false">
<Annotation Term="Core.Description" String="Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" />
</Parameter>
<Parameter Name="ExpandLevels" Type="Edm.Int64" Nullable="false">
<Annotation Term="Core.Description" String="Number of levels to be expanded (absent means all levels)" />
<Annotation Term="Core.OptionalParameter">
<Record/>
</Annotation>
</Parameter>
<Parameter Name="ExpandEntries" Type="Collection(Analytics.AutoExpandEntry)" Nullable="false">
<Annotation Term="Core.Description" String="Entries with exceptional expansion" />
<Annotation Term="Core.OptionalParameter">
<Record/>
</Annotation>
</Parameter>
<ReturnType Type="Collection(Edm.EntityType)">
<Annotation Term="Core.Description" String="Output set including the instance annotation [`LevelInformation`](#LevelInformation)" />
</ReturnType>
</Function>
<ComplexType Name="AutoExpandLevel">
<Annotation Term="Common.Experimental" />
<Property Name="P" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="A non-empty set of property names constituting a level in an [unnamed leveled hierarchy](#AutoExpand)" />
</Property>
</ComplexType>
<ComplexType Name="AutoExpandSiblingOrder">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Sibling order in an [unnamed leveled hierarchy](#AutoExpand)" />
<Property Name="Property" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Property by which to sort" />
</Property>
<Property Name="Order" Type="Analytics.SortOrderType" Nullable="false" DefaultValue="Analytics.SortOrderType/Asc">
<Annotation Term="Core.Description" String="Sorting direction" />
</Property>
</ComplexType>
<TypeDefinition Name="SortOrderType" UnderlyingType="Edm.String">
<Annotation Term="Common.Experimental" />
<Annotation Term="Validation.AllowedValues">
<Collection>
<Record>
<PropertyValue Property="Value" String="asc" />
<Annotation Term="Core.Description" String="Sort in ascending order" />
</Record>
<Record>
<PropertyValue Property="Value" String="desc" />
<Annotation Term="Core.Description" String="Sort in descending order" />
</Record>
</Collection>
</Annotation>
</TypeDefinition>
<ComplexType Name="AutoExpandEntry">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Expansion state of an entry in an [unnamed leveled hierarchy](#AutoExpand)" />
<Property Name="Entry" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to and including the given one" />
</Property>
<Property Name="Levels" Type="Edm.Int64" Nullable="true">
<Annotation Term="Core.Description" String="Number of levels to be expanded, null means all levels, 0 means collapsed" />
</Property>
</ComplexType>
<Term Name="LevelInformation" Type="Hierarchy.HierarchyType" Nullable="false" AppliesTo="EntityType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation" />
</Term>
</Schema>
</edmx:DataServices>
</edmx:Edmx>