IDataView
A view on the calculated data.
export interface IDataView
Remarks
See also the {@link @gooddata/sdk-ui#DataViewFacade}. This wrapper on top of this raw IDataView can be used to work with the data in a way more convenient fashion.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| (BETA) (Optional) Configuration for the clustering, if available. | ||
| (BETA) (Optional) Clustering result, if available. | ||
| (Optional) Execution context metadata available on this data view. | ||
| number[] | Count of data in each dimension. | |
| The calculated data. Dimensionality of the data matches the dimensions requested at execution time. | ||
| Full definition of execution that computed data included in this DataView. | ||
| (BETA) (Optional) Configuration for the forecasting, if available. | ||
| (BETA) (Optional) Forecasting result, if available. | ||
| IResultHeader[][][] | Headers are metadata for the data in this view. | |
| (ALPHA) Additional metadata for the particular execution result. | ||
| number[] | Coordinates of where this data view starts. One coordinate per result dimension. | |
| (ALPHA) (Optional) Configuration for the outliers, if available. | ||
| (ALPHA) (Optional) Outliers result, if available. | ||
| Result of the execution that calculated data for this view. | ||
| number[] | Total size of data in each dimension. | |
| DataValue[][][] | (Optional) Grand totals included in this data view. | |
| DataValue[][][] | (Optional) Totals of grand totals included in this data view. | |
| (Optional) Result warnings. |
Methods
Method | Description |
|---|---|
(BETA) Return clustering data view. This object is empty if | |
Tests if this data view is same as the other data view. | |
Unique fingerprint of this data view. | |
(BETA) Return forecast data view. This object is empty if not | |
(ALPHA) Return outliers data view. This object is empty if not | |
(ALPHA) Retrieves collection items (geospatial features) using provided configuration. | |
(BETA) Adds clustering for this data view. | |
(BETA) Adds forecast for this data view. | |
(ALPHA) Adds outliers for this data view. |
Property details
IDataView.clusteringConfigpropertyBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Configuration for the clustering, if available.
readonly clusteringConfig?: IClusteringConfig;
IDataView.clusteringResultpropertyBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Clustering result, if available.
readonly clusteringResult?: IClusteringResult;
IDataView.contextproperty
Execution context metadata available on this data view.
readonly context?: IExecutionContext;
IDataView.countproperty
Count of data in each dimension.
readonly count: number[];
IDataView.dataproperty
The calculated data. Dimensionality of the data matches the dimensions requested at execution time.
readonly data: DataValue[][] | DataValue[];
IDataView.definitionproperty
Full definition of execution that computed data included in this DataView.
readonly definition: IExecutionDefinition;
IDataView.forecastConfigpropertyBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Configuration for the forecasting, if available.
readonly forecastConfig?: IForecastConfig;
IDataView.forecastResultpropertyBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Forecasting result, if available.
readonly forecastResult?: IForecastResult;
IDataView.headerItemsproperty
Headers are metadata for the data in this view.
readonly headerItems: IResultHeader[][][];
Remarks
There are headers for each dimension and in each dimension headers are further sliced by the attribute or measure or total to which the data belongs.
Thus:
- Top array contains 0 to N per-dimension arrays, one for each requested dimension (if any) - The per-dimension arrays then contain per-slice array, one for each attribute or measure in the dimension - The per-slice-array then contains the actual result header which includes information such as attribute element or measure name
IDataView.metadatapropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Additional metadata for the particular execution result.
readonly metadata: IExecutionResultMetadata;
IDataView.offsetproperty
Coordinates of where this data view starts. One coordinate per result dimension.
readonly offset: number[];
IDataView.outliersConfigpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Configuration for the outliers, if available.
readonly outliersConfig?: IOutliersConfig;
IDataView.outliersResultpropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Outliers result, if available.
readonly outliersResult?: IOutliersResult;
IDataView.resultproperty
Result of the execution that calculated data for this view.
readonly result: IExecutionResult;
IDataView.totalCountproperty
Total size of data in each dimension.
readonly totalCount: number[];
IDataView.totalsproperty
Grand totals included in this data view.
readonly totals?: DataValue[][][];
Remarks
Grand totals are included for each dimension; within each dimension there is one entry per requested total and for each requested total there are list of values.
Thus:
- Top array contains 0 to N per-dimension arrays - Each per-dimension array contains one per-total entry for each requested total - Each per-total entry contains array of calculated values, cardinality of this matches the cardinality of the data in the respective dimension.
IDataView.totalTotalsproperty
Totals of grand totals included in this data view.
readonly totalTotals?: DataValue[][][];
IDataView.warningsproperty
Result warnings.
readonly warnings?: IResultWarning[];
Remarks
Backend MAY return warnings to indicate that the result is different compared to what the caller can expect. For example, the caller executes a definition with particular filter, but the backend determines that the filter has no effect on the computation. Backend runs the execution and communicates by warning that the filter was useless.
Method details
IDataView.clustering()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Return clustering data view. This object is empty if withClustering was not called
clustering(): IClusteringResult;
Returns
IDataView.equals()method
Tests if this data view is same as the other data view.
equals(other: IDataView): boolean;
Parameters
Parameter | Type | Description |
|---|---|---|
other | other data view |
Returns
boolean
true if equal, false if not
IDataView.fingerprint()method
Unique fingerprint of this data view.
fingerprint(): string;
Returns
string
Remarks
The fingerprint is influenced by the execution result and the offset and limit of the data view.
Thus, two data views on the same result, with same offset and limit will have the same fingerprint.
IDataView.forecast()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Return forecast data view. This object is empty if not withForecast was called
forecast(): IForecastView;
Returns
IDataView.outliers()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Return outliers data view. This object is empty if not withOutliers was called
outliers(): IOutliersView;
Returns
IDataView.readCollectionItems()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Retrieves collection items (geospatial features) using provided configuration.
readCollectionItems(config: ICollectionItemsConfig): Promise<ICollectionItemsResult>;
Parameters
Parameter | Type | Description |
|---|---|---|
config | configuration including collection identifier and optional filters |
Returns
Promise<ICollectionItemsResult>
promise of collection items result with GeoJSON features
IDataView.withClustering()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Adds clustering for this data view.
withClustering(config?: IClusteringConfig, result?: IClusteringResult): IDataView;
Parameters
Parameter | Type | Description |
|---|---|---|
config | (Optional) clustering configuration | |
result | (Optional) clustering result |
Returns
new data view with clustering enabled
IDataView.withForecast()methodBeta
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Adds forecast for this data view.
withForecast(config?: IForecastConfig, result?: IForecastResult): IDataView;
Parameters
Parameter | Type | Description |
|---|---|---|
config | (Optional) forecast configuration | |
result | (Optional) forecast result |
Returns
new data view with forecasting enabled
IDataView.withOutliers()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Adds outliers for this data view.
withOutliers(config?: IOutliersConfig, result?: IOutliersResult): IDataView;
Parameters
Parameter | Type | Description |
|---|---|---|
config | (Optional) outliers configuration | |
result | (Optional) outliers result |
Returns
new data view with outliers enabled