# DATABASE

Config path: `/<database>/params.yaml`

Example:

```yaml
is_transient: true
retention_time: 60
comment: "Test database"
```

## Schema

* **is\_transient** (bool) - make database TRANSIENT
* **retention\_time** (int) - data retention time in days
* **is\_sandbox** (bool) - custom schemas and schema objects created in sandbox database will not be dropped if not present in config
* **permission\_model** (str) **-** name of custom [permission model](/basic/yaml-configs/permission-model.md)
* **external\_volume** (ident) - name of EXTERNAL VOLUME used for [Iceberg tables](/guides/other-guides/iceberg-tables.md)
* **catalog** (ident) - name of CATALOG used for [Iceberg tables](/guides/other-guides/iceberg-tables.md)
* **event\_table** (ident) - name of [EVENT\_TABLE](/basic/yaml-configs/event-table.md)
* **log\_level** (str) - logging parameter [LOG\_LEVEL](https://docs.snowflake.com/en/sql-reference/parameters#label-log-level)
* **log\_event\_level** (str) - logging parameter LOG\_EVENT\_LEVEL
* **metric\_level** (str) - logging parameter [METRIC\_LEVEL](https://docs.snowflake.com/en/sql-reference/parameters#label-metric-level)
* **trace\_level** (str) - logging parameter [TRACE\_LEVEL](https://docs.snowflake.com/en/sql-reference/parameters#trace-level)
* **quoted\_identifiers\_ignore\_case** (bool)
* **owner\_database\_read** (list)
  * *{items}* (ident) - grant READ privileges for objects in another database to OWNER role of this database
* **owner\_database\_write** (list)
  * *{items}* (ident) - grant WRITE privileges for objects in another database to OWNER role of this  database
* **owner\_schema\_read** (list)
  * *{items}* (ident) - grant READ privileges for objects in another schema to OWNER role of this database
* **owner\_schema\_write** (list)
  * *{items}* (ident) - grant WRITE privileges for objects in another schema to OWNER role of this  database
* **owner\_share\_read** (list)
  * *{items}* (ident) - grant IMPORTED PRIVILEGES or DATABASE ROLE for inbound share to OWNER role of this database
* **owner\_integration\_usage** (list)
  * *{items}* (ident) - grant USAGE privilege on global integration to OWNER role of this database
* **owner\_warehouse\_usage** (list)
  * *{items}* (ident) - grant USAGE privilege on warehouse to OWNER role of this database
* **owner\_account\_grants** (list)
  * *{items}* (str) - grant account-level privilege to OWNER role of this database
* **owner\_global\_roles** (list)
  * *{items}* (ident) - grant external roles with custom permissions created outside of SnowDDL to OWNER roles in this database
* **comment** (str)

## Usage notes

1. File `params.yaml` is optional. All parameters are set to default if file is omitted.
2. Schema `PUBLIC` is dropped from newly created databases automatically.
3. Inbound `SHARES` are currently not managed by SnowDDL, but can be created manually by `ACCOUNTADMIN`. You may read more about inbound shares in [the relevant guide](/guides/other-guides/inbound-shares.md).
4. Use **is\_sandbox** parameter if you are planning to let external software to create `SCHEMAS` inside this database. Otherwise schemas which are not mentioned in SnowDDL config will be dropped.
5. **owner\_\*** parameters are designed to provide additional privileges which are required for some object types to operate properly. These parameters require [permission model](/basic/yaml-configs/permission-model.md) with `database_owner` ruleset.

## Links

* [CREATE DATABASE](https://docs.snowflake.com/en/sql-reference/sql/create-database.html)
* [ALTER DATABASE](https://docs.snowflake.com/en/sql-reference/sql/alter-database.html)
* [SHOW DATABASES](https://docs.snowflake.com/en/sql-reference/sql/show-databases.html)
* [Parser & JSON Schema (GitHub)](https://github.com/littleK0i/SnowDDL/blob/master/snowddl/parser/database.py)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snowddl.com/basic/yaml-configs/database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
