Titan Core
  • Overview
  • Getting Started
  • Working With Resources
  • Blueprint
  • GitHub Action
  • Resources
    • APIAuthenticationSecurityIntegration
    • APIIntegration
    • AccountParameter
    • AggregationPolicy
    • Alert
    • AuthenticationPolicy
    • AzureStorageIntegration
    • ComputePool
    • Database
    • DatabaseRole
    • DynamicTable
    • EmailNotificationIntegration
    • EventTable
    • ExternalAccessIntegration
    • ExternalStage
    • FailoverGroup
    • FutureGrant
    • GCSStorageIntegration
    • GenericSecret
    • GlueCatalogIntegration
    • Grant
    • GrantOnAll
    • HybridTable
    • ImageRepository
    • InternalStage
    • JSONFileFormat
    • JavascriptUDF
    • MaterializedView
    • NetworkPolicy
    • NetworkRule
    • OAuthSecret
    • ObjectStoreCatalogIntegration
    • PackagesPolicy
    • ParquetFileFormat
    • PasswordPolicy
    • PasswordSecret
    • Pipe
    • PythonStoredProcedure
    • PythonUDF
    • ReplicationGroup
    • ResourceMonitor
    • Role
    • RoleGrant
    • S3StorageIntegration
    • Schema
    • Sequence
    • Service
    • SessionPolicy
    • Share
    • SnowflakePartnerOAuthSecurityIntegration
    • SnowservicesOAuthSecurityIntegration
    • StageStream
    • Table
    • TableStream
    • Tag
    • Task
    • User
    • View
    • ViewStream
    • Warehouse
Powered by GitBook
On this page
  • Examples
  • Python
  • YAML
  • Fields
  1. Resources

DatabaseRole

PreviousDatabaseNextDynamicTable

Last updated 11 months ago

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

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

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.

Snowflake Documentation