Concepts → Incorta Analyzer Table Formula Column
With the Analyzer, you can create an Incorta Analyzer Table for a physical schema. An Incorta Analyzer Table represents the materialized result of a Listing table or Aggregated table visualization. A load or update of an Incorta Analyzer Table persists data to shared storage as Apache Parquet files.
Prior to Release 2021.3.2, an Incorta Analyzer table persisted to shared storage as Direct Data Mapping (DDM) files, but not Apache Parquet files.
You add a formula column to an Incorta Analyzer Table in the Analyzer when creating the table. It is not possible to add a formula column to an Incorta Analyzer Table using the Table Editor.
After creating a formula column using Formula Builder, in the Analyzer, the following properties are available in the Table Editor:
|Show in Analyzer||checkbox||Select if the column is displayed in the Analyzer tool||Select or deselect checkbox|
|Name||read only||The column’s name; used in the fully qualified name of the column.||Valid characters: A-Z, a-z, 0-9, \$, _ |
Name must begin with a letter character
|Label||read only||A user-friendly name. See NOTE below on editing Label.||utf-8 md valid characters, including emoji 😀|
|Type||read only||The Incorta Data Type of the column. See below section on type casting.||Integer, Double, Long, String, Date, Timestamp, Text, and Null|
|Function||drop down list||Select the Incorta Function of the column||Dimension or Measure. An Incorta Analyzer table cannot have a key column|
|Encrypt||drop down list||Select if the column is encrypted in shared storage.||False |
Starting with release 2021.3.2, Incorta Analyzer tables do not support encrypted columns. You cannot set this property; it is always
Starting with release 2021.3.2, the encryption property for an Incorta Analytics table column is always set to false. In older releases, you can set it to either
The name property is only editable in the Analyzer. The default name is New Formula. You can return to the Analyzer to edit the column name. While in the Analyzer, double click the name of the formula column pill to edit the name. The label for the column will be automatically assigned the same as the column name.
Formula columns can be assigned as measures in a Listing Table visualization.
Formula columns can be assigned as grouping dimensions and measures for Aggregated Table visualizations.
Incorta will assign the Incorta Data Type of a formula column based on the output data of the formula. If you need to change the Incorta Data Type of the column you will need to convert the type using casting. You can cast the output of a formula using built-in conversion functions, such as int(), in the Formula Builder.
The Formula Builder supports the following built-in functions for an Incorta Analyzer Table formula column:
|Aggregation||Functions that accumulate data to a summary value||average, count, distinct, max, median, min, or sum|
|Boolean||Functions that evaluate to True or False||and, between, contains, endsWith, in, inList, isNan, isNull, like, not, or, startsWith|
|Conditional Statement||Statements that return a value based on the evaluation of a parameter||case, decode, and if|
|Conversion||Functions that convert the Incorta Data Type of a parameter. In addition, functions that manipulate Timestamp and Date values for different return values.||day, double, monthName, parseDouble, string, toChar, and year|
|Filter||Functions that specify a subset of data items||firstVersion or lastVersion|
|Miscellaneous||Functions with assorted uses||descendantOf, lookup, rowNumber, and schemaRefreshTime|
|Arithmetic||Functions that take one or more values and return a single value||abs, ceil, exp, floor, max, min, mod, rnd, round, sqrt, and trunc|
|Date||Functions that manipulate Timestamp and Date values||addDays, date, month, removeTime, weekday, and year|
|String||Functions that return string values or return values based on string parameters||bin, concat, find, ifNull, repeat, rTrim, and upper|
|Analytic||Functions that compute values over a group of rows and returns a single result for each row||denseRank, index, or rank|
A formula expression returns a scalar value or array of values. These values are of a specific type. A formula expression can consist of builtin-functions, variables, and referenced columns.
Formula columns have some specific capabilities in regards to the kind of columns, schema, and views they can reference in their formula expressions.
Using the Analyzer tool, you create the formula expression for a formula column in the Formula Builder.
The following are the referencing capabilities of an Incorta Analyzer Table formula column:
A data backed column references data that persists to shared storage.
|Table or View Type||Column Type||Referenceable||Note|
|Business Schema View||Data-backed column||Yes|
|Business Schema View||Formula column||Yes|
|Incorta Analyzer Table||Data-backed column||No|
|Incorta Analyzer Table||Formula column||No|
|Incorta SQL Table||Data-backed column||No||The Incorta SQL Table is an Incorta Labs feature in this release.|
|Incorta Analyzer View||Data-backed column||No|
|Incorta Analyzer View||Formula column||No|
|Materialized View||Data-backed column||Yes|
|Materialized View||Formula column||Yes|
|Physical Schema Table||Data-backed column||Yes|
|Physical Schema Table||Formula column||Yes|
In the Formula Builder, in the Functions and Variables panel, certain variables are referenceable in the formula expression. Some types of variables all users have access to and other kinds of variables are subject to Discretionary Access Control (DAC).
Here are the various categories of variables:
- System variables: Predefined variables within Incorta that return a value as a defined type.
- External session variables: Variables that query an external data source when invoked. Values returned as string.
- Internal session variables: Variables that query data within a schema. Values returned as string.
- Global Variables: Variables available to all tenant users that return a scalar value or an array of scalar values as a type defined per the query syntax.
Formula expressions in an Incorta Analyzer Table can reference the following variables:
|System variable||Yes||Excluding the $user variable|
|External session variable||No||Referenceable in the Analyzer for the Incorta Analyzer Table. A table load will succeed. In the Analyzer for an Insight, the formula column will show as #ERROR.|
|Internal session variable||No||Referenceable in the Analyzer for the Incorta Analyzer Table. A table load will succeed. In the Analyzer for an Insight, the formula column will show as #ERROR.|
|Global variable||Yes||Supported starting the 2022.4.0 release|
When using system variables in the physical schema, the system variable’s value is only calculated on a schema load. The value will not be calculated at runtime. Take this into account when using them in any aspect of your physical schema.
You can perform aggregations using an Incorta Analyzer table formula column, taking advantage of an aggregation function. Alternatively, you can also build the Incorta Analyzer table in the Analyzer as an Aggregated table.
A business schema view column can reference an Incorta Analyzer table. The same Incorta Analyzer table can reference the same business schema view column. These types of cyclical dependencies will cause errors and should be avoided.