> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data: Filter items or apply transformers

> Filters items based on the configured conditions, then applies data transformers to the remaining items.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Filters items based on the configured conditions, then applies data transformers to the remaining items. This is the most common transformer step: in most cases you only configure the data transformers to reshape each item. The optional filters let you skip items that do not meet your conditions before any transforming happens, so unwanted items drop out of the route early.

This documentation describes: [Schema](/schemas/transformer-step/data)

## Fields

<FormField property="filters" label="Filters" diType="filter">
  Optional conditions that decide which items continue. An item must match every filter to pass; items that do not match are skipped and are not handed to the data transformers. Use this to drop items of a certain type, items missing a value, and the like.
</FormField>

<FormField property="transformers" label="Data transformers" diType="transformer">
  The data transformers to apply to each item that passes the filters, in the order you list them. This is where you reshape the data: rename fields, set values, look things up, and so on.
</FormField>

## Sample data

This step filters and reshapes the items passing through a route, so it runs as part of a route rather than on its own. A configuration that keeps every item and applies a single data transformer looks like this:

| Field             | Value                                  |
| ----------------- | -------------------------------------- |
| Filters           | (none)                                 |
| Data transformers | One data transformer that sets a value |

With this configuration, no items are filtered out and every item is sent through the listed data transformer before continuing through the route. Add one or more filters to skip items that should not be processed.

```json Configuration theme={null}
{
  "prototype": "data",
  "parameters": {
    "filters": [],
    "transformers": [
      {
        "prototype": "value-setter",
        "parameters": {
          "configurations": [
            { "key": "status", "value": "processed" }
          ]
        }
      }
    ]
  }
}
```
