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 |
|---|---|---|---|
| String | Name of the catalog (database) where the view will be created | No |
| String | Name of the schema where the view will be created | No |
| String | Name of the view to create | Yes |
| Boolean | If true, replaces the view if it already exists using | No* |
| Boolean | If true, only creates the view if it doesn't exist using | No* |
| Boolean | If true, creates a secure view that restricts access to the view definition | No |
| String | Comment describing the view | No |
| Nested | The SELECT statement that defines the view | Yes |
| Nested | Row-level security control for the view | No |
| 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 |
|---|---|---|---|
| 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 |
|---|---|---|---|
|
| View column to map to policy | Yes |