##### Page tree

Trifacta SaaS

Contents:

In this example, you learn how to compute exponentials and square roots on your numeric data.

Functions:

ItemDescription
POW Function Computes the value of the first argument raised to the value of the second argument.
SQRT Function Computes the square root of the input parameter.  Input value can be a Decimal or Integer literal or a reference to a column containing numeric values. All generated values are non-negative.

Source:

The dataset below contains values for x and y:

XY
34
49
810
3040

Transformation:

You can use the following transformation to generate values for z2

NOTE: Do not add this step to your recipe right now.

Transformation Name `New formula` `Single row formula` `(POW(x,2) + POW(y,2))` `'Z'`

You can see how column Z is generated as the sum of squares of the other two columns, which yields z2.

Now, edit the transformation to wrap the value computation in a `SQRT` function. This step is done to compute the value for z, which is the distance between the two points based on the Pythagorean theorem.

Transformation Name `New formula` `Single row formula` `SQRT((POW(x,2) + POW(y,2)))` `'Z'`

Results:

XYZ
345
499.848857801796104
81012.806248474865697
304050

See Also for EXAMPLE - POW and SQRT Functions:

• Page:
• Page: