<commit_before># Filter Row based on condition

FILTER-ROW-IF-TRUE directive provides support for filters records that match the condition.

## Deprecated

Please use [FILTER-ROWS-ON](filter-rows-on.md) directive.

## Syntax
```
  filter-row-if-true <condition>
```

```condition``` is a valid boolean expression resulting in either ```true``` or ```false```.

## Usage Notes

The FILTER-ROW-IF-TRUE directive evaluates the boolean condition for each record. If the result of evaluation is ```true```,
 it skips the record, else it passes the record as-is to the input of next directive.

```condition``` is specified in JEXL expression language. The JEXL context is decorated with ```Math``` and
```StringUtils``` libraries for additional. The additional utility libraries are defined in 'math' and 'string'
namespace.

For more information on how to write JEXL expression please refer [here](docs/directive/expression.md).

## Examples

Let's illustrate how this directive works with a concrete example.
Let's assume that you have input records as follows:

```
  {
    "id" : 1
    "name" : "<NAME>",
    "hrlywage" : "12.34",
    "gender" : "Male",
    "country" : "US",
  }
```

You want to operate only on the records where an individual is residing in ```country``` US.<commit_msg>Update filter-row-if-true.md<commit_after># Filter Row based on condition

FILTER-ROW-IF-TRUE directive provides support for filters records that match the condition.

## Deprecated

Please use [FILTER-ROWS-ON](filter-rows-on.md) directive.

## Syntax
```
  filter-row-if-true <condition>
```

```condition``` is a valid boolean expression resulting in either ```true``` or ```false```.

## Usage Notes

The FILTER-ROW-IF-TRUE directive evaluates the boolean condition for each record. If the result of evaluation is ```true```,
 it skips the record, else it passes the record as-is to the input of next directive.

```condition``` is specified in JEXL expression language. The JEXL context is decorated with ```Math``` and
```StringUtils``` libraries for additional. The additional utility libraries are defined in 'math' and 'string'
namespace.

For more information on how to write JEXL expression please refer [here](https://commons.apache.org/proper/commons-jexl/reference/syntax.html).

## Examples

Let's illustrate how this directive works with a concrete example.
Let's assume that you have input records as follows:

```
  {
    "id" : 1
    "name" : "<NAME>",
    "hrlywage" : "12.34",
    "gender" : "Male",
    "country" : "US",
  }
```

You want to operate only on the records where an individual is residing in ```country``` US.
{'fraction_non_alphanumeric': 0.12010642341315089, 'fraction_numerical': 0.003800836183960471, 'mean_word_length': 4.253493013972056, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3613681', 'n_tokens_mistral': 780, 'n_tokens_neox': 729, 'n_words': 320}