You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

As part of the refactoring and integration of the Data Lake REST API into the Data Explorer, the return type of Data Lake queries needs to be harmonized.

Hence, after a brief overview of the status quo, a draft for the harmonization of return types is presented below.

Status Quo

org.apache.streampipes.model.datalake | ui/src/app/core-model/datalake

Data Result

The return type for simple queries without grouping or paging is a DataResult object.

Data Result
DataResult {
    measureName: string;
    total: number;
    headers: string[];
    rows: any[];
    labels: string[];
}

Note: "labels" is not used in the entire project and is therefore obsolete.

Grouped Data Result

The return type for queries with grouping is a GroupedDataResult object.

Grouped Data Result
GroupedDataResult {
    total: number;
    dataResults: Map<string, DataResult>;
}

Page Result

The return type for queries with paging is a PageResult object, that extends DataResult class by two properties.

PageResult
PageResult {
	measureName: string;
    total: number;
    headers: string[];
    rows: any[];
    labels: string[];

    page: number;
    pageSum: number;
}

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 required will not be taken into consideration when defining the future Data Lake Query Result.

So far, two drafts of an aligned return type have been worked out, which differ only slightly from each other.

Draft 1

  • No labels