...
org.apache.streampipes.model.datalake | ui/src/app/core-model/datalake
Currently, there are three different return types, depending on the query type (simple query, query with grouping, query with paging).
Data Result
The return type for simple queries without grouping or paging is a DataResult object.
...
Note: "labels" from DataResult as well as "pageSum" are not used in the entire project and are therefore obsolete.
Harmonization Drafts
The objective of harmonizing the return types is to elaborate a single flexible Data Lake Query Result definition that is capable of mapping the multiple features of the redesigned Data Lake REST API. Properties that are no longer needed will not be taken into consideration when defining the future Data Lake Query Result (i.e., "labels" and paging specific properties).
So far, two drafts of an aligned return type have been worked out, which differ only slightly from each other.
Draft 1
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
DataLakeResult {
measureName: string;
total: number;
headers: string[];
groupingTags: string[];
data: Map<string, any[]>;
} |
Property | Description |
---|---|
measureName | Index of the Measurement Series in Data Lake |
total | Number of entries in data map (corresponds to the number of groups) |
headers | Column names contained in the query result |
groupingTags | Column names by which was grouped |
data | Actual query results
|
Note: for queries without grouping, "groupingTags" is omitted and a unique default value (to be specified) is used as key for data mapping.
Draft 2
Instead of a simple array as value in data mapping, a dedicated Data Result object is used that contains the number of items within the group in addition to the related query results.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
DataLakeResult {
measureName: string;
total: number;
headers: string[];
groupingTags: string[];
data: Map<string, DataResult>;
}
DataResult {
total: number;
rows: any[];
} |
Property | Description |
---|---|
measureName | Index of the Measurement Series in Data Lake |
total | Number of entries in data map (corresponds to the number of groups) |
headers | Column names contained in the query result |
groupingTags | Column names by which was grouped |
data | Actual query results
|
Note: for queries without grouping, "groupingTags" is omitted and a unique default value (to be specified) is used as key for data mapping.