Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

ISNULL

ISNULL

Returns whether a value is NULL. ISNULL evaluates an empty string as FALSE.
To test for empty strings, use LENGTH.

Syntax

ISNULL(
value
)
The following table describes the argument for this command:
Argument
Required/
Optional
Description
value
Required
Any datatype except Binary. Passes the rows you want to evaluate. You can enter any valid transformation expression.

Return Value

TRUE (1) if the value is NULL.
FALSE (0) if the value is not NULL.

Example

The following example checks for null values in the items table:
ISNULL( ITEM_NAME )
ITEM_NAME
RETURN VALUE
Flashlight
0 (FALSE)
NULL
1 (TRUE)
Regulator system
0 (FALSE)
''
0 (FALSE)  
Empty string is not NULL

ISNULL and Complex Data Types

You can use ISNULL to check whether an array or a struct has a null value.
The following expressions check for the null values in the following complex data types:
Complex Data Type
Input Value
RETURN VALUE
NULL_array = NULL
ISNULL(NULL_array)
1 (TRUE)
NULL_struct = NULL
ISNULL(NULL_struct)
1 (TRUE)
num_array = [1, 2, 3]
ISNULL(num_array)
0 (FALSE)
num_array = [1, NULL, 3]
ISNULL(num_array)
0 (FALSE)
num_struct{ number: int rank: int }
ISNULL(num_struct)
0 (FALSE)

0 COMMENTS

We’d like to hear from you!