# WithCreationScript

- Module: [Aspire.Hosting.Azure.Kusto](/reference/api/go/aspire.hosting.azure.kusto.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`
- Defined on: [`AzureKustoReadWriteDatabaseResource`](/reference/api/go/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Defines the script used to create the database.

## Remarks

This script will only be executed when the Kusto resource is running in emulator mode. In production scenarios, the database creation should be handled as part of the provisioning process.

## Definition

```go
func (AzureKustoReadWriteDatabaseResource) WithCreationScript(script string) AzureKustoReadWriteDatabaseResource
```

## Parameters

- `script` (`string`) -- KQL script to create databases, tables, or data.

## Returns

[`AzureKustoReadWriteDatabaseResource`](/reference/api/go/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`AzureKustoReadWriteDatabaseResource`](/reference/api/go/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource.md)
