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

Schema

PreviousS3StorageIntegrationNextSequence

Last updated 10 months ago

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

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

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.

  • comment (string) - A comment about the schema.

owner (string or ) - The owner of the schema. Defaults to "SYSADMIN".

Snowflake Documentation
Role