Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

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 required 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
languagejs
firstline1
titleData Lake Result - Draft 1
DataLakeResult {
    measureName: string;
    total: number;
    headers: string[];
	groupingTags: string[];
    data: Map<string, any[]>;
}


PropertyDescription
measureNameIndex of the Measurement Series in Data Lake
totalNumber of entries in data map (corresponds to the number of groups)
headersColumn names contained in the query result
groupingTagsColumn names by which was grouped
data

Actual query results

  • key: matches the form "groupingTag = groupingValue"
  • value: row-by-row query result (each row corresponds to one measurement)

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
languagejs
firstline1
titleData Lake Result - Draft 2
DataLakeResult {
    measureName: string;
    total: number;
    headers: string[];
	groupingTags: string[];
    data: Map<string, DataResult>;
}

DataResult {
	total: number;
	rows: any[];
}


PropertyDescription
measureNameIndex of the Measurement Series in Data Lake
totalNumber of entries in data map (corresponds to the number of groups)
headersColumn names contained in the query result
groupingTagsColumn names by which was grouped
data

Actual query results

  • key: matches the form "groupingTag = groupingValue"
  • value: data result belonging to the group
    • total: number of items in the group.
    • rows: row-by-row query result (each row corresponds to one measurement)

Note: for queries without grouping, "groupingTags" is omitted and a unique default value (to be specified) is used as key for data mapping.