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.

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.

Properties of a formula column in an Incorta Analyzer Table

After creating a formula column using Formula Builder, in the Analyzer, the following properties are available in the Table Editor:

PropertyControlDescriptionConfiguration
Column Nameread onlyThe 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
Column Labelread onlyA user-friendly name. See NOTE below on editing Label.utf-8 md valid characters, including emoji 😀
Column Typeread onlyThe Incorta Data Type of the column. See below section on type casting.Integer, Double, Long, String, Date, Timestamp, Text, and Null
Functiondrop down listSelect the Incorta Function of the columnDimension, Measure, or Key
Descriptiontext boxEnter a description of the column
Encrypttoggle (read only)Incorta Analyzer tables do not support encrypted columns. You cannot set this property; it is always false.
Show in AnalyzercheckboxSelect if the column is displayed in the Analyzer toolSelect or deselect checkbox
Data LineagelinkSelect the Lineage link to open the Data Lineage Viewer v2 that displays a diagram with the entities referenced in the respective column (upstream lineage) and entities where the respective column is referenced (downstream lineage).
Important: Key columns in Analyzer Tables

Before 6.0.3 On-Premises and 2024.1.2 Cloud releases, an Incorta Analyzer table would not allow the function of an Incorta Analyzer table column or Incorta Analyzer table formula column to be a key. However, starting with these releases, you can specify key columns for Incorta Analyzer and SQL tables.

Adding, removing, or changing key columns does not require running a load job as derived tables are refreshed as part of schema update jobs. The derived table’s unique index is calculated and saved as a snapshot DDM file each time the key columns are updated or the schema or table is loaded. Make sure that you select the right key columns that ensure row uniqueness; otherwise, loading the derived table might finish with errors.

Label and Name Properties

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.

Incorta Function Property: Measure and Dimension

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.

Formula Column type casting

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.

Supported built-in functions

The Formula Builder supports the following built-in functions for an Incorta Analyzer Table formula column:

Function TypeDescriptionExample
AggregationFunctions that accumulate data to a summary valueaverage, count, distinct, max, median, min, or sum
BooleanFunctions that evaluate to True or Falseand, between, contains, endsWith, in, inList, isNan, isNull, like, not, or, startsWith
Conditional StatementStatements that return a value based on the evaluation of a parametercase, decode, and if
ConversionFunctions 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
FilterFunctions that specify a subset of data itemsfirstVersion or lastVersion
MiscellaneousFunctions with assorted usesdescendantOf, lookup, rowNumber, and schemaRefreshTime
ArithmeticFunctions that take one or more values and return a single valueabs, ceil, exp, floor, max, min, mod, rnd, round, sqrt, and trunc
DateFunctions that manipulate Timestamp and Date valuesaddDays, date, month, removeTime, weekday, and year
StringFunctions that return string values or return values based on string parametersbin, concat, find, ifNull, repeat, rTrim, and upper
AnalyticFunctions that compute values over a group of rows and returns a single result for each rowdenseRank, index, or rank

Incorta Analyzer table formula column references

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:

Note

A data backed column references data that persists to shared storage.

Table or View TypeColumn TypeReferenceable
AliasData-backed columnYes
AliasFormula columnYes
Business Schema ViewData-backed columnYes
Business Schema ViewFormula columnYes
Incorta Analyzer TableData-backed columnNo
Incorta Analyzer TableFormula columnNo
Incorta SQL TableData-backed columnNo
Incorta Analyzer ViewData-backed columnNo
Incorta Analyzer ViewFormula columnNo
Materialized ViewData-backed columnYes
Materialized ViewFormula columnYes
Physical Schema TableData-backed columnYes
Physical Schema TableFormula columnYes

Variable references in formula expressions

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:

Variable TypeReferenceableNote
System variableYesExcluding the $user variable
External session variableNoReferenceable 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 variableNoReferenceable 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 variableNoReferenceable in the Analyzer for a formula column in the Incorta Analyzer Table. A table load will succeed. In the Analyzer (when exploring data or creating an insight based on the Analyzer table), the formula column will show as #ERROR or empty value.
Note

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.

Additional Considerations

Aggregations

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.

Circular dependencies

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.