Skip to content

Create View

The Create View transformation component lets you output an SQL view to your cloud data warehouse. The SQL view is a virtual table based on the dataset passed to the component by the upstream input—it doesn't store data itself but represents a saved query that can be reused. In some circumstances, creating a view may be preferable to writing the dataset to a physical table. For a description of SQL views, consult the appropriate documentation for your cloud data warehouse, or read View (SQL).

This component performs the equivalent of the SQL CREATE OR REPLACE VIEW operation.

If you give the view the name of an existing view or table, be aware of the following:

  • If a view of the same name already exists, it will be replaced when the component runs.
  • If a table of the same name already exists, the component will fail to run. The Create View component can't replace an existing table, only an existing view.

Views created by this component won't be dropped when the transformation pipeline is revalidated. However, the views will be recreated at runtime (when the transformation pipeline is executed).

Use case

Some common uses for SQL views include:

  • Reusing complex logic across pipelines. Instead of duplicating the pipeline logic, you can encapsulate it in a view for consistent reuse and easier maintenance.
  • Simplifying access for BI tools or analysts. You can choose to expose just the relevant fields and pre-aggregated data as a clean, user-friendly view.
  • Creating fast, queryable access to subsets of data for exploration or reporting. Views are performant, easy to create, and don't consume storage.

Properties

Name = string

A human-readable name for the component.


Database = drop-down

The Snowflake database that the newly created view will belong to. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.


Schema = drop-down

The Snowflake schema that the newly created view will belong to. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.


View Name = string

The name of the view to be created.


Secure View = boolean

When Yes, the view definition and details are only visible to authorized users, i.e. users who are granted the role that owns the view. Default is No. Snowflake advises that views should be defined as secure when they are specifically designated for data privacy. For more information about secure views, read the Snowflake documentation.


View Type = drop-down

Select the view type:

  • Materialized: A materialized view is a pre-computed data set derived from a query specification and stored for later use. Since the data is pre-computed, querying a materialized view is faster than executing the original query. Materialized views are advised when:

    • Query results contain a small number of rows and/or columns relative to the base table.
    • Query results contain results that require significant processing.
  • Standard: (default setting) Create standard views when:

    • The results of the view change often.
    • The results are not used often (relative to the rate at which the results change).
    • The query is not resource intensive, so it is not costly to re-run it.

Name = string

A human-readable name for the component.


Catalog = drop-down

Select a Databricks Unity Catalog. The special value [Environment Default] uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.


Schema (Database) = drop-down

The Databricks schema. The special value [Environment Default] uses the schema defined in the environment. Read Create and manage schemas to learn more.


View Name = string

The name of the view to be created.


Table Properties = column editor

  • Key: A metadata property within the table. These are expressed as key=value pairs.
  • Value: The value of the corresponding row's key.

Comment = string

A descriptive comment for the view.

Name = string

A human-readable name for the component.


Schema = drop-down

Select the table schema. The special value [Environment Default] uses the schema defined in the environment. For more information on using multiple schemas, read Schemas.


View Name = string

The name of the view to be created.


Late Binding = boolean

Select Yes to create a late-binding view. Late-binding views do not check underlying database objects, such as tables and other views, until the view is queried. As a result, users can alter or drop the underlying objects without dropping and recreating the view. A query to a late-binding view will fail if the user drops underlying objects, or if the query references columns in the underlying object that aren't present.

The default setting is No.


View Type = drop-down

Select Standard or Materialized.

A materialized view is a pre-computed data set derived from a query specification and stored for later use. Since the data is pre-computed, querying a materialized view is faster than executing the original query. Materialized views are advised when:

  • Query results contain a small number of rows and/or columns relative to the base table.
  • Query results contain results that require significant processing.

For more information, read CREATE MATERIALIZED VIEW.

The default setting is Standard. Create a standard view when:

  • The results of the view change often.
  • The results are not used often (relative to the rate at which the results change).
  • The query is not resource intensive, so it is not costly to re-run it.

For more information, read CREATE VIEW.