# Filters

## Overview

Filters are the foundational component to manage incoming events.

This is a technique that **removes irrelevant or sensitive data** from a stream by evaluating each element with **pre-set conditions**.&#x20;

Filters aim to **improve processing efficiency**, especially when only a subset of the data is needed for your use case.

These filters allow you a variety of options such as **filtering event based** using a configurable criteria or a custom expression.

## Use cases

Here are some use cases of how it can be applied in stream processing:

1. <mark style="color:green;">**Apply customer opt in / out policies**</mark>\
   Manage the inclusion of customer events within the processing stream using static lists.
2. <mark style="color:green;">**Addressing missing data elements**</mark>\
   Validate all required data is present before further stream processing by dropping events.
3. <mark style="color:green;">**Handling PII data**</mark>\
   Remove or mask PII field data within the event.&#x20;
4. <mark style="color:green;">**Handling out-of-range values**</mark>\
   Validate and process events that meet a within range criteria.&#x20;

## Available filters options

<table data-card-size="large" data-column-title-hidden data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:orange;"><strong>By type</strong></mark></td><td>Filter events based on specific types from the processing pipeline</td><td></td><td><a href="/pages/C3N6QFGqalt8TDzRq5BT">/pages/C3N6QFGqalt8TDzRq5BT</a></td></tr><tr><td><mark style="color:orange;"><strong>By expression</strong></mark></td><td>Use Javascript expressions to define custom filters.</td><td></td><td><a href="/pages/8DDTFnXdKRBbkpJgMX0u">/pages/8DDTFnXdKRBbkpJgMX0u</a></td></tr><tr><td><mark style="color:orange;"><strong>On delta</strong></mark></td><td>Stateful filter processor that filters previous seen events</td><td></td><td><a href="/pages/4DSefptWgTbbDEDu58hx">/pages/4DSefptWgTbbDEDu58hx</a></td></tr><tr><td><mark style="color:orange;"><strong>Remove attributes</strong></mark></td><td>Remove sensitive attributes from an event</td><td></td><td><a href="/pages/CgjVB8qulDWyhmjmdGEA">/pages/CgjVB8qulDWyhmjmdGEA</a></td></tr><tr><td><mark style="color:orange;"><strong>Drop all</strong></mark></td><td>Drop all incoming events in the processor</td><td></td><td><a href="/pages/ttNbaLPNzofqtcjGAyZ2">/pages/ttNbaLPNzofqtcjGAyZ2</a></td></tr></tbody></table>


---

# 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.fractalworks.io/joule/components/processors/filters.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.
