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

# drill()

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

> **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).
> 

Creates the [IDrill](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrill/index.md) command. Dispatching this command will result into dispatching [IDashboardDrillResolved](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboarddrillresolved/index.md) event.

This is general dashboard drill command with details about all possible more granular drill interactions that can follow. Reason for this general drill command is that it may happen that multiple drill interactions are possible for one drill event.

Example: some attribute on the insight has drill down set and also widget has drill to insight set. Then this command must be dispatched with both [IDrillDownDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.idrilldowndefinition/index.md) and  definitions.

- This must be always the first command that occurs after the drill interaction and must be dispatched before more granular drill commands. - Specific drill commands that can follow this general drill command are: [IDrillDown](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilldown/index.md), [IDrillToInsight](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilltoinsight/index.md), [IDrillToDashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilltodashboard/index.md),  [IDrillToCustomUrl](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilltocustomurl/index.md), [IDrillToAttributeUrl](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilltoattributeurl/index.md), [IDrillToLegacyDashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrilltolegacydashboard/index.md)

**Signature:**

```typescript
export declare function drill(drillEvent: IDashboardDrillEvent, drillContext: IDashboardDrillContext, correlationId?: string): IDrill;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| drillEvent | [IDashboardDrillEvent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboarddrillevent/index.md) | original drill event, that triggered this particular drill interaction. |
| drillContext | [IDashboardDrillContext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboarddrillcontext/index.md) | context in which the drill interaction was triggered (widget and insight details - if available). |
| correlationId | string | _(Optional)_ specify correlation id. It will be included in all events that will be emitted during the command processing. |

**Returns:**

[IDrill](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idrill/index.md)

drill command
