> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IExecutionResult

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/workspace/execution/index.ts

Represents results of execution done with particular definition.

**Signature:**

```typescript
export interface IExecutionResult extends ICancelable<IExecutionResult> 
```
**Extends:** [ICancelable](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.icancelable/index.md)&lt;[IExecutionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md)&gt;

## Remarks

Within the result is the description of the shape of the data and methods to to obtain views on the data.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [context?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultcontext) | `readonly` | [IExecutionContext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutioncontext/index.md) | _(Optional)_ Arbitrary metadata carried over from the originating prepared execution. |
| [definition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultdefinition) | `readonly` | [IExecutionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutiondefinition/index.md) | Full definition of execution that yielded this result. |
| [dimensions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultdimensions) | `readonly` | [IDimensionDescriptor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idimensiondescriptor/index.md)[] | Description of shape of the data. |
| [signal?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultsignal) | `readonly` | AbortSignal | _(Optional)_ Abort signal to cancel the result retrieval. Note that the abort signal is shared with the prepared execution that created this result, so if you cancel the result and want to retrieve it later again, you should always create also a new execution for it. |

## Methods

| Method | Description |
| --- | --- |
| [equals(other)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultequals) | Tests if this execution result is same as the other result. |
| [export(options)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultexport) | Asynchronously exports all data in this result to a blob. Exported file is downloaded and attached as Blob data to the current window instance. |
| [fingerprint()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultfingerprint) | Unique fingerprint of the execution result. |
| [readAll()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadall) | Asynchronously reads all data for this result into a single data view. |
| [readAnomalyDetectionAll(config)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadanomalydetectionall) | **_(ALPHA)_** Reads anomaly detection for the execution result. |
| [readBinaryStreamAll(config)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadbinarystreamall) | **_(ALPHA)_** Reads all the execution result data as a binary stream. |
| [readClusteringAll(config)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadclusteringall) | **_(ALPHA)_** Reads anomaly detection for the execution result. |
| [readForecastAll(config)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadforecastall) | **_(BETA)_** Reads forecast for the execution result. |
| [readOutliersAll(config)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadoutliersall) | **_(ALPHA)_** Reads outliers for the execution result. |
| [readWindow(offset, size)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresultreadwindow) | Asynchronously reads a window of data for this result. |
| [transform()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md#iexecutionresulttransform) | Transforms this execution result - changing the result sorting, dimensionality and available totals is possible through transformation. |

## Property details

### IExecutionResult.context

Arbitrary metadata carried over from the originating prepared execution.

**Signature:**

```typescript
readonly context?: IExecutionContext;
```

### IExecutionResult.definition

Full definition of execution that yielded this result.

**Signature:**

```typescript
readonly definition: IExecutionDefinition;
```

### IExecutionResult.dimensions

Description of shape of the data.

**Signature:**

```typescript
readonly dimensions: IDimensionDescriptor[];
```

### IExecutionResult.signal

Abort signal to cancel the result retrieval.

Note that the abort signal is shared with the prepared execution that created this result, so if you cancel the result and want to retrieve it later again, you should always create also a new execution for it.

**Signature:**

```typescript
readonly signal?: AbortSignal;
```

## Method details

### IExecutionResult.equals()

Tests if this execution result is same as the other result.

**Signature:**

```typescript
equals(other: IExecutionResult): boolean;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| other | [IExecutionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md) | other result |

**Returns:**

boolean

true if equal, false if not

### IExecutionResult.export()

Asynchronously exports all data in this result to a blob.

Exported file is downloaded and attached as Blob data to the current window instance.

**Signature:**

```typescript
export(options: IExportConfig): Promise<IExportResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| options | [IExportConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexportconfig/index.md) | customize how the result looks like (format etc.) |

**Returns:**

Promise&lt;[IExportResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexportresult/index.md)&gt;

promise with object URL pointing to a Blob data of downloaded exported insight

### IExecutionResult.fingerprint()

Unique fingerprint of the execution result.

**Signature:**

```typescript
fingerprint(): string;
```
**Returns:**

string

#### Remarks

The fingerprint is influenced by both data included in the result and its dimensionality, sorting and totals.

Thus, two results with the same data and same execution definition will have the same fingerprint.

### IExecutionResult.readAll()

Asynchronously reads all data for this result into a single data view.

**Signature:**

```typescript
readAll(): Promise<IDataView>;
```
**Returns:**

Promise&lt;[IDataView](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idataview/index.md)&gt;

Promise of data view

### IExecutionResult.readAnomalyDetectionAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Reads anomaly detection for the execution result.

**Signature:**

```typescript
readAnomalyDetectionAll(config: IAnomalyDetectionConfig): Promise<IAnomalyDetectionResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [IAnomalyDetectionConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianomalydetectionconfig/index.md) |  |

**Returns:**

Promise&lt;[IAnomalyDetectionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianomalydetectionresult/index.md)&gt;

### IExecutionResult.readBinaryStreamAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Reads all the execution result data as a binary stream.

**Signature:**

```typescript
readBinaryStreamAll(config: IExecutionResultBinaryStreamConfig): Promise<ReadableStream>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [IExecutionResultBinaryStreamConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresultbinarystreamconfig/index.md) |  |

**Returns:**

Promise&lt;ReadableStream&gt;

### IExecutionResult.readClusteringAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Reads anomaly detection for the execution result.

**Signature:**

```typescript
readClusteringAll(config: IClusteringConfig): Promise<IClusteringResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [IClusteringConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iclusteringconfig/index.md) |  |

**Returns:**

Promise&lt;[IClusteringResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iclusteringresult/index.md)&gt;

### IExecutionResult.readForecastAll()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Reads forecast for the execution result.

**Signature:**

```typescript
readForecastAll(config: IForecastConfig): Promise<IForecastResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [IForecastConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iforecastconfig/index.md) |  |

**Returns:**

Promise&lt;[IForecastResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iforecastresult/index.md)&gt;

### IExecutionResult.readOutliersAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Reads outliers for the execution result.

**Signature:**

```typescript
readOutliersAll(config: IOutliersConfig): Promise<IOutliersResult>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [IOutliersConfig](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ioutliersconfig/index.md) |  |

**Returns:**

Promise&lt;[IOutliersResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ioutliersresult/index.md)&gt;

### IExecutionResult.readWindow()

Asynchronously reads a window of data for this result.

**Signature:**

```typescript
readWindow(offset: number[], size: number[]): Promise<IDataView>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| offset | number[] | coordinates where the window starts |
| size | number[] | size of the window in each of the dimensions |

**Returns:**

Promise&lt;[IDataView](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idataview/index.md)&gt;

Promise of data view

#### Remarks

The window is specified using offset array and size array. The offsets specify coordinates where the view starts and are zero-based. The sizes specify size of the window in each of the results dimension.

### IExecutionResult.transform()

Transforms this execution result - changing the result sorting, dimensionality and available totals is possible through transformation.

**Signature:**

```typescript
transform(): IPreparedExecution;
```
**Returns:**

[IPreparedExecution](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ipreparedexecution/index.md)

new prepared execution with no sorts, dimensions or totals

#### Remarks

It is strongly encouraged to use this function every time when data SHOULD remain the same and just its sorting or dimensionality or totals MUST change. That is because since this intent of the caller is known, the function can apply additional optimizations and obtain the updated result faster compared to fully running the execution.

Whether the reuse of the computed result actually happens depends on couple of factors:

- Transformation is eligible: adding new native totals (roll-ups) necessitates full re-execution;  all other types of changes (including adding other types of totals) are eligible for execution result reuse.

- Backend capabilities: backend MAY NOT be able to natively reuse existing execution result. This is  communicated by the canTransformExistingResult indicator.

If the transformation is not eligible for result reuse or the backend is not capable of this optimization, then a new execution WILL be done completely transparently for the caller.
