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 ("").


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.


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:


Created in 2020 by Google Inc.