Filter Guide
OCPQ can also filter an OCEL 2.0 log based on the results of a query. The filtered log then only contains a subset of the events, objects, as well as event-to-object (E2O) and object-to-object (O2O) relationships of the input log.
Start
For that, first follow the Query Guide to load an OCEL and create a query.
In this guide, we use the box from the Constraint Guide, i.e., an order o1 with its place order event e1 and its pay order event e2.

Defining Filters
Next, enable the filter mode using the funnel button in the toolbar 1.

In filter mode, every variable and every E2O or O2O filter in a box has a small funnel icon. Clicking on this icon switches between three modes:
- Ignore (default)

- Include

- Exclude

To create the filtered log, OCPQ first evaluates the query. Next, it collects all objects, events, and E2O and O2O relationships bound to included elements into an included set, and those bound to excluded elements into an excluded set.
The filtered log contains everything from the included set that is not also part of the excluded set.
Exporting
While the filter mode is enabled, an export button 1 is shown below the play button. It evaluates the query and saves the filtered log as an OCEL 2.0 file in the JSON, XML, or SQLite format.
