# GetDatabaseCreationScript

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

Gets the database creation script from the resource annotation if it exists. If not, creates the default database creation script.

## Remarks

The default script is
```
.create database DATABASE_NAME persist (PERSISTENCE_PATH/DATABASE_NAME/md, PERSISTENCE_PATH/DATABASE_NAME/data) ifnotexists
```
where
DATABASE_NAME is the database name and PERSISTENCE_PATH is .

## Definition

```go
func (AzureKustoReadWriteDatabaseResource) GetDatabaseCreationScript() (string, error)
```

## Returns

`(string, error)`

Returns `(string, error)`.

## Applies to

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