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

# insightSetBuckets()

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

Gets a new insight that 'inherits' all data from the provided insight but has different buckets.

**Signature:**

```typescript
export declare function insightSetBuckets<T extends IInsightDefinition>(insight: T, buckets?: IBucket[] | undefined): T;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| insight | T | insight to work with |
| buckets | [IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md)[] \| undefined | _(Optional)_ new buckets to apply |

**Returns:**

T

always new instance

## Remarks

New buckets will be used in the new insight as-is, no merging with existing buckets.
