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

View

PreviousUserNextViewStream

Last updated 11 months ago

Represents a view in Snowflake, which is a virtual table created by a stored query on the data. Views are used to simplify complex queries, improve security, or enhance performance.

Examples

Python

view = View(
    name="some_view",
    owner="SYSADMIN",
    secure=True,
    as_="SELECT * FROM some_table"
)

YAML

views:
  - name: some_view
    owner: SYSADMIN
    secure: true
    as_: "SELECT * FROM some_table"

Fields

  • name (string, required) - The name of the view.

  • secure (bool) - Specifies if the view is secure.

  • volatile (bool) - Specifies if the view is volatile.

  • recursive (bool) - Specifies if the view is recursive.

  • columns (list) - A list of dictionaries specifying column details.

  • tags (dict) - A dictionary of tags associated with the view.

  • change_tracking (bool) - Specifies if change tracking is enabled.

  • copy_grants (bool) - Specifies if grants should be copied from the base table.

  • comment (string) - A comment for the view.

  • as_ (string) - The SELECT statement defining the view.

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

Snowflake Documentation
Role