Working with numbers in Soma

  • Performing numeric calculations on values in one column

  • Performing numeric calculations on values in two columns

  • Performing numeric calculations on values in three or more columns

In Algoreus, you can quickly perform numeric calculations on the following types of columns:

  • Integer

  • Decimal

  • Double

  • Float

  • Long

  • Short

Note: To use numeric functions on Decimal columns, use the Algoreus CLI.

You can use numeric functions on one or multiple columns. The available numeric functions vary depending on how many columns you select. You can choose to create a new column with the results of the calculations or you can have the results appear in the column where you add the transformation.

If you apply a numeric function to a single column, the behavior is different than if you apply a numeric function to multiple columns.

For example, if you use the Multiply function on a single column, you must specify a decimal value by which to multiply each value in the column. Algoreus performs the multiplication on the sample data and displays the new values in the same column or in a new column.

If you use the Multiply function on multiple columns, Algoreus multiplies the values in each row for the selected columns and displays the new values in the first column of the transformation.


Performing numeric calculations on values in one column

You can perform the following calculations on all values in the column:

  • Add

  • Subtract

  • Multiply

  • Divide

  • Module

  • Power of

  • Square

  • Square root

  • Cube

  • Cube root

  • Log

  • Natural log

  • Absolute value

  • Ceil

  • Floor

  • Cos

  • Sin

  • Tan

  • Arccos

  • Arcsin

  • Arctan

  • Round

  • Random

To apply a numeric calculation to one column, follow these steps:

  1. Click the drop-down button next to the column name.

  2. Click Calculate, and then select the numeric function you want to perform.

  3. Some functions require a decimal value to complete the calculation. For example, if you select Subtract, enter the number to subtract from each row.

  4. You can choose to create a new column with the results of numeric calculation or overwrite the values in the current column.

  5. Click Apply.

The values change based on the calculation. Algoreus adds the corresponding function as a step in the recipe.

When you run the data axon, the transformation is applied to all values in the column.


Performing numeric calculations on values in two columns

You can perform the following numeric calculations on values in each row in two columns:

  • Add

  • Subtract

  • Multiply

  • Divide

  • Module

  • LCM

  • Equal

  • Max

  • Min

  • Average

To apply a numeric calculation to two columns, follow these steps:

  1. To select the columns, click the box to the right of the column names.

  2. Click the drop-down button next to one of the column names and click Calculate.

  3. Select the numeric function you want to perform.

  4. You can choose to create a new column with the results of numeric calculations or overwrite the values in the current column.

  5. Click Apply.

The values change based on the calculation. Algoreus adds the corresponding function as a step in the recipe.


Performing numeric calculations on values in three or more columns

You can perform the following calculations on values in each row in three or more columns:

  • Add

  • Multiply

  • Max

  • Min

  • Equal

  • Average

To apply a numeric calculation to three or more columns, follow these steps:

  1. To select the columns, click the box to the right of the column name.

  2. Click the drop-down button next to one of the column names and click Calculate.

  3. Select the numeric function you want to perform.

  4. You can choose to create a new column with the results of numeric calculations or overwrite the values in the current column.

  5. Click Apply.

The values change based on the calculation. Algoreus adds the corresponding function as a step in the recipe.


Last updated