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

# IUseInsightDataViewConfig

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

Configuration for [useInsightDataView()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.useinsightdataview/index.md) hook.

**Signature:**

```typescript
export interface IUseInsightDataViewConfig 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [backend?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigbackend) |  | [IAnalyticalBackend](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianalyticalbackend/index.md) | _(Optional)_ Backend to work with. |
| [dateFormat?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigdateformat) |  | string \| ((def: [IExecutionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutiondefinition/index.md)) =&gt; string) | _(Optional)_ Modify date formatting on prepared insight execution, before it's executed. |
| [dimensions?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigdimensions) |  | [IDimension](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idimension/index.md)[] \| ((def: [IExecutionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutiondefinition/index.md)) =&gt; [IDimension](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idimension/index.md)[]) | _(Optional)_ Modify dimensions on prepared insight execution, before it's executed. |
| [enableExecutionCancelling?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigenableexecutioncancelling) |  | boolean | _(Optional)_ Optionally enable real execution cancellation. This means that if the execution request is not yet finished and the execution changes, the request will be cancelled and the new execution will be started. Default: false |
| [executeByReference?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigexecutebyreference) |  | boolean | _(Optional)_ Indicates that the execution to obtain the data for the insight should be an 'execution by reference'. Execution by reference means that the useInsightDataView will ask analytical backend to compute results for an insight which is stored on the backend by specifying link to the insight, additional filters and description how to organize the data. Otherwise, a freeform execution is done, in which the InsightView will send to backend the full execution definition of what to compute. This distinction is in place because some backends MAY want to prohibit users from doing freeform executions and only allow computing data for set of insights created by admins. Note: the need for execute by reference is rare. You will typically be notified by the solution admin to use this mode. |
| [filters?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigfilters) |  | [INullableFilter](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.inullablefilter/index.md)[] | _(Optional)_ Specify filters to merge with filters already defined in the insight. |
| [insight?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfiginsight) |  | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | _(Optional)_ Reference to the insight for which you want to get the data view. |
| [sorts?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigsorts) |  | [ISortItem](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.isortitem/index.md)[] \| ((def: [IExecutionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutiondefinition/index.md)) =&gt; [ISortItem](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.isortitem/index.md)[]) | _(Optional)_ Modify sorts on prepared insight execution, before it's executed. |
| [window?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigwindow) |  | [DataViewWindow](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.dataviewwindow/index.md) | _(Optional)_ You can define only a specific "window" of data to load. |
| [workspace?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iuseinsightdataviewconfig/index.md#iuseinsightdataviewconfigworkspace) |  | string | _(Optional)_ Workspace where execution should be executed. |

## Property details

### IUseInsightDataViewConfig.backend

Backend to work with.

**Signature:**

```typescript
backend?: IAnalyticalBackend;
```

#### Remarks

Note: the backend must come either from this property or from BackendContext. If you do not specify backend here, then the executor MUST be rendered within an existing BackendContext.

### IUseInsightDataViewConfig.dateFormat

Modify date formatting on prepared insight execution, before it's executed.

**Signature:**

```typescript
dateFormat?: string | ((def: IExecutionDefinition) => string);
```

### IUseInsightDataViewConfig.dimensions

Modify dimensions on prepared insight execution, before it's executed.

**Signature:**

```typescript
dimensions?: IDimension[] | ((def: IExecutionDefinition) => IDimension[]);
```

### IUseInsightDataViewConfig.enableExecutionCancelling

Optionally enable real execution cancellation.

This means that if the execution request is not yet finished and the execution changes, the request will be cancelled and the new execution will be started.

Default: false

**Signature:**

```typescript
enableExecutionCancelling?: boolean;
```

### IUseInsightDataViewConfig.executeByReference

Indicates that the execution to obtain the data for the insight should be an 'execution by reference'.

Execution by reference means that the useInsightDataView will ask analytical backend to compute results for an insight which is stored on the backend by specifying link to the insight, additional filters and description how to organize the data.

Otherwise, a freeform execution is done, in which the InsightView will send to backend the full execution definition of what to compute.

This distinction is in place because some backends MAY want to prohibit users from doing freeform executions and only allow computing data for set of insights created by admins.

Note: the need for execute by reference is rare. You will typically be notified by the solution admin to use this mode.

**Signature:**

```typescript
executeByReference?: boolean;
```

### IUseInsightDataViewConfig.filters

Specify filters to merge with filters already defined in the insight.

**Signature:**

```typescript
filters?: INullableFilter[];
```

### IUseInsightDataViewConfig.insight

Reference to the insight for which you want to get the data view.

**Signature:**

```typescript
insight?: ObjRef;
```

#### Remarks

Note: When the reference or identifier is not provided, hook is locked in a "pending" state.

### IUseInsightDataViewConfig.sorts

Modify sorts on prepared insight execution, before it's executed.

**Signature:**

```typescript
sorts?: ISortItem[] | ((def: IExecutionDefinition) => ISortItem[]);
```

### IUseInsightDataViewConfig.window

You can define only a specific "window" of data to load.

**Signature:**

```typescript
window?: DataViewWindow;
```

#### Remarks

This is useful if you want to page data.

### IUseInsightDataViewConfig.workspace

Workspace where execution should be executed.

**Signature:**

```typescript
workspace?: string;
```

#### Remarks

Note: the workspace must come either from this property or from WorkspaceContext. If you do not specify workspace here, then the executor MUST be rendered within an existing WorkspaceContext.
