Snowflake createView

Last updated: April 29, 2026

Creates a Snowflake view with optional row access policy for row-level security. Views are virtual tables that present query results as a table. The secure option hides the view definition from unauthorized users.

Note: Automatic rollback drops the view.

Known limitations: Snowflake snapshots created with Liquibase Secure 5.1 are incompatible with earlier versions due to enhanced object type detection for TABLES and VIEWS. Regenerate all snapshots with 5.1 after upgrading to avoid false differences in diff and diff-changelog operations.

The Liquibase createView changetype is not compatible for Snowflake users in Liquibase Secure 5.1 using YAML or JSON changetype formats. This does not affect XML change types at all. If you’re connecting to a Snowflake database, Liquibase automatically detects that you are using the Snowflake createView change type and breaks backwards compatibility with the Liquibase createView change type. We recommend upgrading to Liquibase Secure 5.1.1 to use createView with YAML and JSON change type formats successfully.

Available attributes

Attribute

Type

Description

Required

catalogName

String

Name of the catalog (database) where the view will be created

No

schemaName

String

Name of the schema where the view will be created

No

viewName

String

Name of the view to create

Yes

replaceIfExists

Boolean

If true, replaces the view if it already exists using OR REPLACE

No*

ifNotExists

Boolean

If true, only creates the view if it doesn't exist using IF NOT EXISTS

No*

secure

Boolean

If true, creates a secure view that restricts access to the view definition

No

comment

String

Comment describing the view

No

selectQuery

Nested

The SELECT statement that defines the view

Yes

rowAccessPolicy

Nested

Row-level security control for the view

No

rowAccessPolicyColumns

Nested

Container for column mappings (within rowAccessPolicy)

No

*Only one of replaceIfExists or ifNotExists can be true (mutually exclusive).

Nested elements

selectQuery (required) - The SELECT statement that defines the view. Contains the SQL query as text content.

rowAccessPolicy - Row-level security control for the view:

Attribute

Type

Description

Required

policyName

String

Name of the row access policy to apply

Yes

rowAccessPolicyColumns (nested within rowAccessPolicy) - Container for column mappings. View columns are mapped positionally to policy arguments (names don't need to match).

Element

Attribute

Description

Required

column

columnName

View column to map to policy

Yes

loading

loading

loading

loading