> For the complete documentation index, see [llms.txt](https://docs.snowddl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snowddl.com/basic/yaml-configs/schema.md).

# SCHEMA

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

Example:

```yaml
retention_time: 7
is_sandbox: true

owner_schema_read:
  - another_db.another_schema_1
  - another_db.another_schema_2

owner_warehouse_usage:
  - my_warehouse

owner_integration_usage:
  - my_storage_integration

owner_account_grants:
  - EXECUTE ALERT
```

## Schema

* **is\_transient** (bool) - make schema TRANSIENT
* **retention\_time** (int) - data retention time in days
* **is\_sandbox** (bool) - custom objects created in sandbox schema 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)
* **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 a database to OWNER role of this schema
* **owner\_database\_write** (list)
  * *{items}* (ident) - grant WRITE privileges for objects in a database to OWNER role of this schema
* **owner\_schema\_read** (list)
  * *{items}* (ident) - grant READ privileges for objects in another schema to OWNER role of this schema
* **owner\_schema\_write** (list)
  * *{items}* (ident) - grant WRITE privileges for objects in another schema to OWNER role of this  schema
* **owner\_share\_read** (list)
  * *{items}* (ident) - grant IMPORTED PRIVILEGES or DATABASE ROLE for inbound share to OWNER role of this schema
* **owner\_integration\_usage** (list)
  * *{items}* (ident) - grant USAGE privilege on global integration to OWNER role of this schema
* **owner\_warehouse\_usage** (list)
  * *{items}* (ident) - grant USAGE privilege on warehouse to OWNER role of this schema
* **owner\_account\_grants** (list)
  * *{items}* (str) - grant account-level privilege to OWNER role of this schema
* **owner\_global\_roles** (list)
  * *{items}* (ident) - grant external roles with custom permissions created outside of SnowDDL to OWNER role of this schema
* **comment** (str)

## Usage notes

1. File `params.yaml` is optional. All parameters are set to default if file is omitted.
2. **is\_transient** and **retention\_time** are inherited from [DATABASE](/basic/yaml-configs/database.md) object if omitted.
3. Objects in database or schema marked with **is\_sandbox** flag will not be dropped by SnowDDL if not defined in config.
4. When defining custom **permission\_model**, the ruleset of database permission\_model and schema permission\_model must be the same.
5. **owner\_schema\_read** and **owner\_schema\_write** parameters are helpful when dealing with `VIEWS` and `PROCEDURES`, which require access to objects in another schemas. Usually only objects in the current schema are available to the `OWNER` role of this schema.
6. **owner\_integration\_usage** parameter helps to provide additional `USAGE` privileges on various externally defined [integration](/guides/other-guides/integrations.md) objects to schema `OWNER` role, which helps to resolve various permission-related issues. For example, it is required in order for error notification integrations to work properly.

## Links

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