# AzureKustoReadWriteDatabaseResource.GetDatabaseCreationScript

- Module: [Aspire.Hosting.Azure.Kusto](/reference/api/go/aspire.hosting.azure.kusto.md)
- Defined on: [AzureKustoReadWriteDatabaseResource](/reference/api/go/aspire.hosting.azure.kusto/azurekustoreadwritedatabaseresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

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
type AzureKustoReadWriteDatabaseResource interface {
    // ... omitted for brevity
    GetDatabaseCreationScript() (string, error)
}
```

## Signature

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

## Returns

`(string, error)`

Returns `(string, error)`.

## Defined on

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