Excerpt |
---|
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. |
Numeric literal example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:sqrt(25) |
---|
|
sqrt(25) |
Output: Returns the square root of 25, which is 5
.
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:sqrt(MyValue) as: 'sqroot_MyValue' |
---|
|
sqrt(MyValue) |
Output: Returns the square root of the values of the MyValue
column.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:sqrt(numeric_value) |
---|
|
sqrt(numeric_value) |
Argument | Required? | Data Type | Description |
---|
numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal to apply to the function |
numeric_value
Name of the column or numeric literal whose values are used to compute the square root.
Info |
---|
NOTE: Negative input values generate null output values. |
- Missing input values generate missing results.
- Literal numeric values should not be quoted.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference) or Integer or Decimal literal | 25 |
Example - Pythagorean Theorem
Include Page |
---|
| EXAMPLE - POW and SQRT Functions |
---|
| EXAMPLE - POW and SQRT Functions |
---|
|