# Java filter

The Java filter step refines a transformation data stream using a Java expression to set up conditional processing.

![Transformation using the Java filter step](/files/hNR5zykW0v0HcagvRLjh)

As shown in the sample transformation above, the output stream from the Data grid step is processed by the Java filter step. Based on the specified condition, the Java filter step sends matching data to the true step and non-matching data to the false step. Below is the condition used in this sample transformation.

```
if( condition)
{matching step}

else
{non-matching step}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/java-filter-pdi-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
