Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
title:Warning
title:Warning
borderColorblack
bgColor#ffff00
borderStylesolid

(warning) PLEASE NOTE: This documentation applies to Pentaho 8.3 and earlier. For Pentaho 9.0 and later, see Java Filter on the Pentaho Enterprise Edition documentation site.

Description

The Java Filter Step allows the stream to be filtered using user defined Java expressions. The input stream, coming from one or more steps, can be redirected to two different steps based on the evaluation of the written expression.

...

In other words, the user is able to perform an if-statement to filter the data stream with pure java expressions:

Code Block

if( Condition )
  {matching-step}
else
  {non-matching step}

Options

Option

Description

Step Name

Name of the step; this name has to be unique in a single transformation.

Destination step for matching rows (optional)

The rows for which the written condition is evaluated to true are sent to this step

Destination step for non-matching rows (optional)

The rows for which the written condition is evaluated to false are sent to this step

Condition (Java Expression)

Defines the Java condition on which to filter the data. See examples below

Examples

These code samples applies to the Condition (Java Expression) field.

Filters a string that contains white space

Code Block

field.contains(" ");

Filters a string that is identical to a constant string

Code Block

field.equals("Positive");

Filters a boolean value

Code Block

field == Boolean.TRUE