Concepts → Materialized View Column

About a materialized view column

A materialized view column exists in a materialized view and is a query reference to a column in a physical schema table, an Incorta Analyzer table, an Incorta SQL table, or a business schema view.

Note

Before release 5.1.2, a materialized view can reference columns only from a physical schema table or a business schema view.

Warning

A materialized view column cannot reference a column in an Incorta Analyzer table or Incorta SQL table that exists in the same physical schema as the materialized view.

In addition, a materialized view column cannot reference an Incorta Analyzer table column or Incorta SQL table column that references a business schema view.

Properties of a materialized view column

A materialized view column has the following configurable properties:

PropertyControlDescription
Show in AnalyzercheckboxSelect to show as a selectable column in the Data Panel in the Analyzer
Nameread onlyThe column’s name; used in the fully qualified name of the column.
Labeltext boxA user friendly name
Typedrop down listThe data type of the column. The data type of a column in a materialized view is initially determined by the source column.
Functiondrop down listSelect the Incorta function of the column
Encryptdrop down listSelect if you want to encrypt the column data in shared storage.
Available only starting with the 5.1.2 release.
Source Encrypteddrop down listSpecify if the source column is encrypted in shared storage or not.
Available in releases older than the 5.1.2 release.

Name property

The name property, by default, is the source column’s name. You can use the SQL AS command to change this property. You can still edit the label property as needed.

Type property

The source column’s type property initially determines the type property of the materialized view column. If you change the type of the source column, the type property of a physical schema table column for example, it will affect the referenced column in the materialized view. If you change the type property of the source column that cannot be properly type casted, you may need to recreate the materialized view.

Note

While you can change the type property of the column, improperly setting the type property can result in load errors or improper visualization functionality.

Function property

The function property of a materialized view column not only determines how the Loader Service stores data for the column, but also influences how tools such as the Analyzer assign a specific behavior to the column.

Note

You should maintain that the function property of a column in a materialized view is the same as the source column’s function property.

Function: Key

A column that functions as key defines a uniqueness constraint. For a materialized view, you can specify zero or more key columns. Two or more key columns define a composite key for the given materialized view.

As a unique constraint, the Loader Service will enforce the uniqueness of rows based on the defined key column or composite key columns if you enable the Enforce Primary Key Constraint property. When disabled, the Loader Service will skip the PK index calculation and uniqueness check.

In the Data Panel of the Analyzer and the Formula Builder, a key column shows as having a key icon.

Note

A key column cannot be encrypted.

Function: Dimension

A dimension categorizes, describes, or groups data. Examples of a dimension column are State, Year, or City. Dimension columns do not require unique values.

A dimension column has an associated behavior in the Analyzer. When a user double-clicks a dimension column in the Data panel, the Analyzer automatically adds the column to the Grouping Dimension tray in the Insight panel.

Function: Measure

A measure is a measurement of data. Examples of a measure column are Revenue, Quantity, and Cost.

A measure column has an associated behavior in the Analyzer. When a user double-clicks a measure column in the Data panel, the Analyzer automatically adds the column to the Measure tray in the Insight panel.

Encryption property

Starting with release 5.1.2, you can use the Table Editor to explicitly specify a column in a materialized view to be encrypted.

For the given materialized view, the Loader Service extracts the unencrypted values from the source column and writes the encrypted values in shared storage in Apache Parquet file format. When reading the Apache Parquet files for the given materialized view, the Analytics Service decrypts the encrypted column values.

The Loader Service encrypts data using built-in, 128-Bit AES encryption.

In older releases, a materialized view does not directly encrypt columns. If the source column is encrypted, the Source Encrypted property will need to be set to true, otherwise, the column’s rows will display the encrypted form of the data as a string.