/
Fill NULL or Empty directive
Fill NULL or Empty directive
The FILL-NULL-OR-EMPTY
directive fills column value with a fixed value if it is either null
or empty ("").
Syntax
fill-null-or-empty :column 'value'
If the
column
does not exist, then the directive will fail.The
value
can only be of type string.
Usage Notes
The FILL-NULL-OR-EMPTY
directive fills the column value with the value
if the column value is null
or empty (an empty string, "").
The value
must be a string and cannot be an empty string value.
When the object in the record is a JSON object and it is null
, the directive checks that it is also applied to those records.
Example
Using this record as an example:
{
"id": 1,
"fname": "root",
"mname": null,
"lname": "joltie",
"address": ""
}
Applying these directives:
fill-null-or-empty :mname 'NA'
fill-null-or-empty :address 'No address specified'
results in this record:
{
"id": 1,
"fname": "root",
"mname": "NA",
"lname": "joltie",
"address": "No address specified"
}
, multiple selections available,
Related content
Drop directive
Drop directive
More like this
Columns Replace directive
Columns Replace directive
More like this
NullToEmpty function
NullToEmpty function
More like this
Filter Rows On directive
Filter Rows On directive
More like this
Set Headers directive
Set Headers directive
Read with this
Filter Row If Matched directive
Filter Row If Matched directive
More like this
Created in 2020 by Google Inc.