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

# useInsightWidgetDataView()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/presentation/widget/common/useInsightWidgetDataView.ts

This hook provides an easy way to read a data view from insight widget.

**Signature:**

```typescript
export declare function useInsightWidgetDataView(input: IUseInsightWidgetDataView & UseInsightWidgetInsightDataViewCallbacks): UseCancelablePromiseState<DataViewFacade, GoodDataSdkError>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { insightWidget, onCancel, onError, onLoading, onPending, onSuccess, } | (not declared) |  |
| input | [IUseInsightWidgetDataView](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iuseinsightwidgetdataview/index.md) &amp; [UseInsightWidgetInsightDataViewCallbacks](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.useinsightwidgetinsightdataviewcallbacks/index.md) |  |

**Returns:**

[UseCancelablePromiseState](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.usecancelablepromisestate/index.md)&lt;[DataViewFacade](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.dataviewfacade/index.md), [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md)&gt;
