# Schema

[Snowflake Documentation](https://docs.snowflake.com/en/sql-reference/sql/create-schema)

Represents a schema in Snowflake, which is a logical grouping of database objects such as tables, views, and stored procedures. Schemas are used to organize and manage such objects within a database.

## Examples

### Python

```python
schema = Schema(
    name="some_schema",
    transient=True,
    managed_access=True,
    data_retention_time_in_days=7,
    max_data_extension_time_in_days=28,
    default_ddl_collation="utf8",
    tags={"project": "analytics"},
    owner="SYSADMIN",
    comment="Schema for analytics project."
)
```

### YAML

```yaml
schemas:
  - name: some_schema
    transient: true
    managed_access: true
    data_retention_time_in_days: 7
    max_data_extension_time_in_days: 28
    default_ddl_collation: utf8
    tags:
      project: analytics
    owner: SYSADMIN
    comment: Schema for analytics project.
```

## Fields

* `name` (string, required) - The name of the schema.
* `transient` (bool) - Specifies if the schema is transient. Defaults to False.
* `managed_access` (bool) - Specifies if the schema has managed access. Defaults to False.
* `data_retention_time_in_days` (int) - The number of days to retain data. Defaults to 1.
* `max_data_extension_time_in_days` (int) - The maximum number of days to extend data retention. Defaults to 14.
* `default_ddl_collation` (string) - The default DDL collation setting.
* `tags` (dict) - Tags associated with the schema.
* `owner` (string or [Role](/titan-core/resources/role.md)) - The owner of the schema. Defaults to "SYSADMIN".
* `comment` (string) - A comment about the schema.


---

# 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://titan-core.gitbook.io/titan-core/resources/schema.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.
