Excerpt |
---|
Returns true if the first argument is equal to the second argument. Equivalent to the = operator. |
- Each argument can be a literal String, Integer or Decimal number, a function, or a column reference.
Since the function returns a Boolean value, it can be used as a function or a conditional.
Info |
---|
NOTE: Within an expression, you might choose to use the corresponding operator, instead of this function. For more information, see Comparison Operators. |
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: if(equal(errorCount, 0),'ok','Error_recorded') as:'status' |
---|
|
if(equal(errorCount, 0),'ok','Error_recorded') |
Output: If the value in the errorCount
column is zero, then the status
column value is ok
. Otherwise, the value is Error_recorded
.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:equal(value1, value2) |
---|
|
equal(value1, value2) |
Argument | Required? | Data Type | Description |
---|
value1 | Y | string | The first value. This value can be a String, a number, a function, or a column reference. |
value2 | Y | string | The second value. This value can be a String, a number, a function, or a column reference. |
value1, value2
Names of the columns, expressions, or literals to compare.
- Missing values generate missing string results.
Required? | Data Type | Example Value |
---|
Yes | Column reference, function, or numeric or String value | myColumn |
Example - Basic Equal and Notequal Functions
Include Page |
---|
| EXAMPLE - Comparison Functions Equal |
---|
| EXAMPLE - Comparison Functions Equal |
---|
|