Concepts → Incorta Table Formula Column

With the Analyzer, you can create an Incorta Table for a physical schema. An Incorta Table represents the materialized result of an Listing table or Aggregated table visualization. A load of an Incorta Table persists data to shared storage as Direct Data Mapping (DDM) files and not as Apache Parquet files.

You can only add a formula column to an Incorta Table using the Analyzer. It is not possible to add a formula column to an Incorta Table using the Table Editor.

Properties of a formula column in an Incorta Table

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.

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

Property Control Description Configuration
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 Key, Dimension, or Measure
Encrypt drop down list Select if the column is encrypted in shared storage True or False

Runtime Business View formula expressions

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.

A referenced column has a fully qualified name. Here are the possible types of referenceable columns in a runtime business view formula expression:

  • Physcial_Schema.Table.Column
  • Physcial_Schema.Table.Formula_Column
  • Physcial_Schema.Incorta_Table.Column
  • Physcial_Schema.Incorta_Table.Formula_Column
  • Business_Schema.View.Column
  • Business_Schema.View.Formula_Column
  • Business_Schema.Incorta_View.Column
  • Business_Schema.Incorta_View.Formula_Column

Using the Analyzer tool, you create the formula expression for a formula column in the Formula Builder.

Supported Built-In Functions

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

Function Type Description Example
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

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.

Formula Column References

Formula columns have some specific capabilities in regards to the kind of columns, schema, and views they can reference in their formula expressions. Below is a table of the referencing capabilities of Incorta Table formula columns:

Note

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

Schema/Table Type Column Type Referenceable Note
Business Schema View Data backed column Yes
Business Schema View Formula column Yes
Incorta View Data backed column No
Incorta View Formula column No
Physical Schema Data backed column Yes Can be within the same schema or a table from a joined schema.
Physical Schema Formula column Yes Can be within the same schema or a table from a joined schema.
Incorta Table Formula column Yes Can be within the same schema or a table from a joined schema.

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: A static variable available to all tenant users that return a value as a defined type.

Formula expressions in an Incorta Table can reference the following variables:

Variable Type Referenceable Note
System Variable Yes
External Session Variable No Referenceable in the Analyzer for the Incorta Table. A table load will succeed. In the Analyzer for an Insight, the formula column will show as #ERROR.
Internal Session Variable No Possible deleted data error will occur at table load.
Global Variable No Not supported in 4.9 or earlier releases

© Incorta, Inc. All Rights Reserved.