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.
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:
Property | Control | Description |
---|---|---|
Show in Analyzer | checkbox | Select to show as a selectable column in the Data Panel in the Analyzer |
Name | read only | The column’s name; used in the fully qualified name of the column. |
Label | text box | A user friendly name |
Type | drop down list | The data type of the column. The data type of a column in a materialized view is initially determined by the source column. |
Function | drop down list | Select the Incorta function of the column |
Encrypt | drop down list | Select if you want to encrypt the column data in shared storage |
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.
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.
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 releases before 6.0.3, when the Enforce Primary Key Constraint option was disabled for physical tables or MVs, and the selected key columns resulted in duplicate key values, unique index calculations would not fail, the first matching value was returned whenever a single value of the key columns was required.
Starting with release 6.0.3, in such a case, the unique index calculation will fail, and the load job will finish with errors. You must either select key columns that ensure row uniqueness and perform a full load or enable the Enforce Primary Key Constraint option and load tables from staging to have the unique index correctly calculated.
In the Data Panel of the Analyzer and the Formula Builder, a key column shows as having a key icon.
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
You can use the Table Editor to explicitly specify a column 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.