Null Field Splitter Transformation

Plugin version: 2.11.0

Use the Null Field Splitter when you want to split records based on whether a specific field is null or not. Records with a null value for the field are sent to the null port while records with a non-null value are sent to the nonnull port.

Configuration

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Field to Split on

Yes

Required. Specifies which field should be checked for null values.

Modify Schema

No

Optional. Whether to modify the schema for non-null output. If set to true, the schema for non-null output will be modified so that the field is no longer nullable.

Default is true.

Output Schema

No

Required. The output schema for the data.

Example

Property

Value

Property

Value

Field to Split on

email

Modify Schema

true

This example takes splits input based on whether the email field is null. For example, if the input to the plugin is:

id (long)

name (strong)

email (nullable string)

id (long)

name (strong)

email (nullable string)

0

alice

 

1

bob

 

2

carl

karl@example.com

3

duncan

duncandonuts@example.com

4

evelyn

 

5

frank

frankfurter@example.com

6

gary

gerry@example.com

then records emitted to the null port will be:

id (long)

name (strong)

email (nullable string)

id (long)

name (strong)

email (nullable string)

0

alice

 

1

bob

 

4

evelyn

 

and records emitted to the nonnull port will be:

id (long)

name (strong)

email (nullable string)

id (long)

name (strong)

email (nullable string)

2

carl

karl@example.com

3

duncan

duncandonuts@example.com

5

frank

frankfurter@example.com

6

gary

gerry@example.com

 

Created in 2020 by Google Inc.