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

# always_where_filters

> Applies a filter to all rows in a query using filter syntax.

Applies a filter to all rows in a query using [filter syntax](/modeling/filters). This parameter is functionally identical to [`always_where_sql`](/modeling/topics/parameters/always-where-sql), but uses filter syntax instead of SQL.

<Note>
  When a new `always_where_filter` is defined, it will apply to all existing queries built from that topic as well as any queries created in the future.
</Note>

This parameter is useful for removing invalid data from the topic, such as deleted records or internal testing.

When defined, a filter will be inserted into the `WHERE` clause of the generated SQL block of all queries in the topic. Users with the **Querier** role can't change this filter and it will be visible only in the underlying SQL of any queries. This filter is additive to any filters specified in the workbook. For optional filter conditions, use [`default_filters`](/modeling/topics/parameters/default-filters).

## Syntax

```yaml theme={null}
always_where_filters:
  <field_name>:
    <filter_operator>: <value>
```

## Properties

<ParamField path="always_where_filters" type="object" required>
  A map of field names to filter conditions that are applied to all queries in the topic using filter syntax.

  <Expandable title="filter structure" defaultOpen="true">
    <ParamField path="field_name" type="object" required>
      The field to filter on, specified as `view_name.field_name`.

      <Expandable title="filter operators" defaultOpen="true">
        <ParamField path="filter_operator" type="any" required>
          The filter operator and value to apply. Refer to the [filter syntax documentation](/modeling/filters) for available operators like `is`, `not`, `contains`, `greater_than`, etc.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Examples

### Filter rows by a static condition

```yaml theme={null}
always_where_filters:
  users.state:
    is: California
```
