Skip to content

Commit

Permalink
Updated fillnull doc to match doc for Spark
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Jordan <[email protected]>
  • Loading branch information
normanj-bitquill committed Dec 3, 2024
1 parent 104445a commit 6df47b6
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions docs/user/ppl/cmd/fillnull.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,20 @@ fillnull

Description
============
| The ``fillnull`` command replaces null values for one or more fields.
Using ``fillnull`` command to fill null with provided value in one or more fields in the search result.


Syntax
============
fillnull "with" <expression> <field> ["," <field> ]...
`fillnull [with <null-replacement> in <nullable-field>["," <nullable-field>]] | [using <source-field> = <null-replacement> [","<source-field> = <null-replacement>]]`

* field: mandatory. Name of an existing field that was piped into ``fillnull``. Null values for all specified fields are replaced with the value of expression.
* expression: mandatory. Any expression support by the system. The expression value type must match the type of field.
* null-replacement: mandatory. The value used to replace `null`s.
* nullable-field: mandatory. Field reference. The `null` values in the field referred to by the property will be replaced with the values from the null-replacement.

fillnull "using" <field> "=" <expression> ["," <field> "=" <expression> ]...

* field: mandatory. Name of an existing field that was piped into ``fillnull``.
* expression: mandatory. Any expression support by the system. The expression value type must match the type of field.

Example 1: Replace null values with the same value for multiple fields
Example 1: fillnull one field
======================================================================

The example show to replace null values for email and host with "<not found>".
The example show fillnull one field.

PPL query::

Expand All @@ -44,10 +39,10 @@ PPL query::
| [email protected] | null |
+-----------------------+----------+

Example 2: Replace null values for multiple fields with different values
Example 2: fillnull applied to multiple fields
========================================================================

The example show to replace null values for email with "<not found>" and null values for host with "<no host>".
The example show fillnull applied to multiple fields.

PPL query::

Expand Down

0 comments on commit 6df47b6

Please sign in to comment.