Data connectivity & integrationPipeline Builder ExpressionsSign

Sign

Supported in: Batch, Faster, Streaming

Returns -1.0 for a negative number, 1.0 for a positive number, and the number itself for zero or not a number.

Expression categories: Numeric

Declared arguments

  • Expression: Number to take the sign of.
    Expression<Numeric>

Output type: Double

Examples

Example 1: Base case

Argument values:

  • Expression: value
valueOutput
2.51.0
-0.1-1.0

Example 2: Null case

Argument values:

  • Expression: value
valueOutput
nullnull