Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-expand transformation #293

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4750db8
auto-expand transformation
HeikoTheissen Nov 10, 2023
53368e3
Avoid EnumType
HeikoTheissen Nov 10, 2023
64e5ae7
Instance annotations for auto-expanded result sets
HeikoTheissen Nov 14, 2023
b5a6f34
Reprased definitions
HeikoTheissen Nov 14, 2023
9238702
SortOrder -> SortOrderType
HeikoTheissen Nov 14, 2023
34b5a64
Avoid <dt>
HeikoTheissen Nov 14, 2023
443f99c
After alignment with @uhlmannm
HeikoTheissen Nov 15, 2023
2fb8ff2
rephrasing
HeikoTheissen Nov 15, 2023
f5dea9f
Make `LeafLevel` mandatory
HeikoTheissen Nov 15, 2023
41b289a
Don't call out instance annotation
HeikoTheissen Feb 2, 2024
2df14e4
Merge remote-tracking branch 'origin/main' into auto-expand
HeikoTheissen Apr 4, 2024
defafdf
Allowed values for DrillState
HeikoTheissen Apr 8, 2024
8584dfe
Merge remote-tracking branch 'origin/main' into auto-expand
HeikoTheissen Apr 11, 2024
f27abe8
auto-refreshed
HeikoTheissen Apr 11, 2024
3ca799d
@uhlmannm's suggestion
HeikoTheissen Apr 12, 2024
92f1abd
Simplifications agreed in V4 table meeting
HeikoTheissen Apr 26, 2024
bb78f7d
Example request
HeikoTheissen Apr 26, 2024
4181573
Rephrased
HeikoTheissen Apr 26, 2024
b227e7f
Typos
HeikoTheissen Apr 26, 2024
e390b0c
@uhlmannm's comments
HeikoTheissen Apr 29, 2024
b9ecf4f
explained example
HeikoTheissen Apr 29, 2024
b587137
expand N levels
HeikoTheissen Apr 29, 2024
ae774a6
renamed type
HeikoTheissen Apr 29, 2024
3cb5082
typo
HeikoTheissen Apr 29, 2024
c9bbadf
more links
HeikoTheissen Apr 29, 2024
3e6379a
corrected LeavesCount, ResultEntriesCount
HeikoTheissen Apr 29, 2024
f98c999
example formatting
HeikoTheissen Apr 29, 2024
64f96eb
save lines
HeikoTheissen Apr 29, 2024
bc35559
round parentheses for in
HeikoTheissen Apr 29, 2024
9f24039
More elegance
HeikoTheissen Apr 29, 2024
8c7b80b
reword: deeper -> finer-grained
HeikoTheissen Apr 29, 2024
4dfd1c6
Sort order like Common.SortOrderType
HeikoTheissen May 2, 2024
5036eba
As agreed in meeting on 2024-05-24
HeikoTheissen May 24, 2024
192cc17
Explain D vs. A
HeikoTheissen May 24, 2024
fbe94b9
Merge remote-tracking branch 'origin/main' into auto-expand
HeikoTheissen Jul 12, 2024
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
111 changes: 111 additions & 0 deletions vocabularies/Analytics.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
},
"https://sap.github.io/odata-vocabularies/vocabularies/Common.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/Hierarchy.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Hierarchy.v1", "$Alias": "Hierarchy" }]
}
},
"com.sap.vocabularies.Analytics.v1": {
Expand Down Expand Up @@ -161,6 +164,114 @@
"@[email protected]": "Adding a list of other terms that can be annotated to it.",
"@Validation.ApplicableTerms": ["Common.Label"]
}
},
"AutoExpand": [
{
"$Kind": "Function",
"$EntitySetPath": "InputSet",
"$IsBound": true,
"@Common.Experimental": true,
"@Core.IsSignature": true,
"@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties",
"$Parameter": [
{
"$Name": "InputSet",
"$Collection": true,
"$Type": "Edm.EntityType",
"@Core.Description": "Entity set to be processed"
},
{
"$Name": "Levels",
"$Collection": true,
"$Type": "Analytics.AutoExpandLevel",
"@Core.Description": "Collection of aggregation levels forming a leveled hierarchy",
"@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n All referenced properties must be groupable."
},
{
"$Name": "ExpandLevel",
"$Type": "Edm.Int64",
"@Core.Description": "Number of levels to be expanded, counting from left",
"@Core.LongDescription": "The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder."
},
{
"$Name": "Aggregation",
HeikoTheissen marked this conversation as resolved.
Show resolved Hide resolved
"$Collection": true,
"@Core.Description": "Properties to aggregate for all result entries on all levels",
"@Core.LongDescription": "All properties in this collection must be custom aggregates."
},
{
"$Name": "SiblingOrder",
"$Collection": true,
"$Type": "Analytics.AutoExpandSiblingOrder",
"@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy"
},
{
"$Name": "BeforeAggregationFilter",
"@Core.Description": "Expression valid for `filter` transformation to restrict the input set before any further procressing",
"@Core.OptionalParameter": {}
},
{
"$Name": "AggregatedValuesLeafFilter",
"@Core.Description": "Expression valid for `filter` transformation to restrict the input set at the most detailed grouping level with conditions on aggregated values",
"@Core.OptionalParameter": {}
},
{
"$Name": "Skip",
"$Type": "Edm.Int64",
"@Core.Description": "Number of entries to skip from the top of the fully ordered result",
"@Core.OptionalParameter": { "DefaultValue": "0" }
},
{
"$Name": "Top",
"$Type": "Edm.Int64",
"@Core.Description": "Number of entries to return from the result set after any skipping (absent means all)",
"@Core.OptionalParameter": {}
},
{
"$Name": "ResultEntriesCount",
"$Type": "Edm.Bool",
"@Core.Description": "Whether to return the total number of entries in the result independent of Skip/Top",
"@Core.OptionalParameter": { "DefaultValue": "false" }
}
],
"$ReturnType": {
"$Collection": true,
"$Type": "Edm.EntityType",
"@Core.Description": "Output set including the instance annotation [`LevelInformation`](#LevelInformation)"
}
}
],
"AutoExpandLevel": {
"$Kind": "ComplexType",
"@Common.Experimental": true,
"P": { "$Collection": true, "@Core.Description": "A non-empty set of property names constituting a level" }
HeikoTheissen marked this conversation as resolved.
Show resolved Hide resolved
},
"AutoExpandSiblingOrder": {
"$Kind": "ComplexType",
"@Common.Experimental": true,
"Property": { "@Core.Description": "Property by which to sort" },
"Order": {
"$Type": "Analytics.SortOrderType",
"$DefaultValue": "Analytics.SortOrderType/Asc",
"@Core.Description": "Sorting direction"
}
},
"SortOrderType": {
"$Kind": "TypeDefinition",
"$UnderlyingType": "Edm.String",
"@Common.Experimental": true,
"@Validation.AllowedValues": [
{ "Value": "asc", "@Core.Description": "Sort in ascending order" },
{ "Value": "desc", "@Core.Description": "Sort in descending order" }
]
},
"LevelInformation": {
"$Kind": "Term",
"$Type": "Hierarchy.HierarchyType",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Common.IsInstanceAnnotation": true,
"@Core.Description": "Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation"
}
}
}
Loading