Column Computation

The Column Computation node makes it possible to produce new columns depending on the values in the existing columns. It is the simplest freely programable node in Blickshift Analytics, because a value can only depend on other values in the same row. This makes it very easy to create a new column that contains e.g. the sum of two columns, or the values of different columns depending on the content of another column. However, more complicated computations that also take previous or following rows into account are not possible.

Each new column is produced by a user-defined C#-function that has the input columns as parameters and must return the value of the new column.

The computation of the new column is started as soon as the focus leaves the code input area. If the provided code contains syntax errors, they will be listed at the bottom of the settings pane. Double clicking on an error message will automatically set the cursor to the position of the error.

The code automatically includes the System namespace of Microsoft's .net API. This means that you can e.g. access the square root function in the Math namespace by using "Math.Sqrt(x)". The most commonly used functions for the column computation node besides simple mathematical operators are those found in the Math namespace (for mathematical operations), and in the String class for manipulating strings.

Output

The node outputs all incoming columns plus a number of additional columns containing the results of the computations set by the user.

Aggregation

The column computation node is not able to aggregate, as all input tables are output with additional columns.

Settings

Columns:
The columns that are used in the creation of the new columns.
Input Column Aliases:
Alias names for each selected column. The alias names are used as function parameters and are sometimes required in order to ensure valid identifiers. They can also be used to shorten overly long column names for more convenient use in the function.
Output Columns Properties
Each output column is defined by three properties: Its type, its name and the function code. In the UI these properties are presented in the form of a C# function. This function has parameters with the names given in the Input Column Aliases and must return a value of the specified type. This function is applied to each row of the data, the values in that rows are passed to the appropriate parameters of the function and the return value written into the newly created column.

homepage