# DatabaseRole

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

A database role in Snowflake is a collection of privileges that can be assigned to users or other roles within a specific database context. It is used to manage access control and permissions at the database level.

## Examples

### Python

```python
database_role = DatabaseRole(
    name="some_database_role",
    database="some_database",
    owner="USERADMIN",
    tags={"department": "finance"},
    comment="This role is for database-specific access control."
)
```

### YAML

```yaml
database_roles:
  - name: some_database_role
    database: some_database
    owner: USERADMIN
    tags:
      department: finance
    comment: This role is for database-specific access control.
```

## Fields

* `name` (string, required) - The name of the database role.
* `database` (string) - The database this role is associated with. This is derived from the fully qualified name.
* `owner` (string) - The owner of the database role. Defaults to "USERADMIN".
* `tags` (dict) - Tags associated with the database role.
* `comment` (string) - A comment about the database role.


---

# 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/database_role.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.
