> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create View

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift", "Google BigQuery"]} componentType="Transformation" connectionInputs="One" connectionOutputs="None" />

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)](https://en.wikipedia.org/wiki/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

<Tabs>
  <Tab title="Snowflake">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[database] | warehouses: [snowflake] --> */}

    <ResponseField name="Database" type="drop-down" required>
      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](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [snowflake] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      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](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[viewName] | warehouses: [snowflake] --> */}

    <ResponseField name="View name" type="string" required>
      The name of the view to be created.
    </ResponseField>

    {/* <!-- param-start:[secureView] | warehouses: [snowflake] --> */}

    <ResponseField name="Secure view" type="boolean" required>
      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](https://docs.snowflake.net/manuals/user-guide/views-secure.html).
    </ResponseField>

    {/* <!-- param-start:[viewType] | warehouses: [snowflake] --> */}

    <ResponseField name="View type" type="drop-down" required>
      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.
    </ResponseField>
  </Tab>

  <Tab title="Databricks">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[catalog] | warehouses: [databricks] --> */}

    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/en/data-governance/unity-catalog/index.html). 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.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [databricks] --> */}

    <ResponseField name="Schema (Database)" type="drop-down" required>
      The Databricks schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Create and manage schemas](https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[viewName] | warehouses: [databricks] --> */}

    <ResponseField name="View name" type="string" required>
      The name of the view to be created.
    </ResponseField>

    {/* <!-- param-start:[tableProperties] | warehouses: [databricks] --> */}

    <ResponseField name="Table properties" type="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.
    </ResponseField>

    {/* <!-- param-start:[comment] | warehouses: [databricks] --> */}

    <ResponseField name="Comment" type="string">
      A descriptive comment for the view.
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      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](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-start:[viewName] | warehouses: [redshift] --> */}

    <ResponseField name="View name" type="string" required>
      The name of the view to be created.
    </ResponseField>

    {/* <!-- param-start:[viewType] | warehouses: [redshift] --> */}

    <ResponseField name="View type" type="drop-down" required>
      Select **Standard** or **Materialized**.

      A [materialized view](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-overview.html) 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](https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-create-sql-command.html).

      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](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html).
    </ResponseField>

    {/* <!-- param-start:[lateBinding] | warehouses: [redshift] --> */}

    <ResponseField name="Late binding" type="boolean" required>
      Only displayed when **View type** is set to **Standard**.

      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**.
    </ResponseField>
  </Tab>

  <Tab title="Google BigQuery">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[gcpProjectId] | warehouses: [bigquery] --> */}

    <ResponseField name="GCP project ID" type="drop-down" required>
      The Google Cloud project that owns the BigQuery dataset. The special value `[Environment Default]` uses the Google Cloud project defined in the environment. For more information, read [Creating projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects).
    </ResponseField>

    {/* <!-- param-start:[dataset] | warehouses: [bigquery] --> */}

    <ResponseField name="Dataset" type="drop-down" required>
      The Google BigQuery dataset where the table will be created or updated. The special value `[Environment Default]` uses the dataset defined in the environment.
    </ResponseField>

    {/* <!-- param-start:[viewName] | warehouses: [bigquery] --> */}

    <ResponseField name="View name" type="string" required>
      The name of the view to be created.
    </ResponseField>

    {/* <!-- param-start:[viewType] | warehouses: [bigquery] --> */}

    <ResponseField name="View type" type="drop-down" required>
      Select the view type:

      * **Standard:** (default) A standard view runs the underlying query each time it's referenced. For more information, read [Introduction to views](https://cloud.google.com/bigquery/docs/views-intro).
      * **Materialized:** A materialized view is a pre-computed data set derived from a query specification and stored for later use. Querying a materialized view is faster than executing the original query. For more information, read [Introduction to materialized views](https://cloud.google.com/bigquery/docs/materialized-views-intro).
    </ResponseField>

    {/* <!-- param-start:[enableRefresh] | warehouses: [bigquery] --> */}

    <ResponseField name="Enable refresh" type="boolean">
      Only displayed when **View type** is set to **Materialized**.

      When **Yes**, the materialized view is automatically refreshed when the underlying base table changes. When **No**, the materialized view is only refreshed manually. For more information, read [Manage materialized views](https://cloud.google.com/bigquery/docs/materialized-views-manage).
    </ResponseField>
  </Tab>
</Tabs>
