Knowledge Model - Filters
By creating Knowledge Model (KM) filters, you can write a Filter Statement in PQL that is applied to either the component it is being used in or across all objects within the KM. By storing and maintaining filters in a Knowledge Model, they can be easily reused in View components and managed in one place.
KM filters can be created as individual filters or as global filters:
Individual filters: These impact only the components in which they are referenced in.
Global filters: These are used to refine the PQL statements of all the objects within the KM and in turn all components they are referenced in.
If there is a global filter active in your Knowledge Model, you will see the "Global filters applied" tag above the KM preview:
In this example, a KM filter has been created to indicate if the invoice for an order has been billed. The Filter Statement (PQL) for this KM filter is then:
FILTER o_celonis_DeliveryItem.IsBilled = 1;
Creating filters in the Knowledge Model
To create filters:
Click Studio and then open the package containing the KM you want to create the filter in.
Open the KM asset.
Select Filters and then click Create Filter.
Configure your filter using the following settings:
Display Name: A human-readable label used in the user interface.
Short Display Name: Shorter human readable label for the object shown automatically on the Views whenever the Display Name is truncated. Can contain max 20 characters.
ID: A technical identifier used for unique referencing of this filter.
Description: A human-readable description for the filter.
Filter Statement: Defines the criteria which will be used to filter the data this filter is applied to. This criterion is defined using PQL statements.
Global Filter: Indicates whether the filter is a global filter.
Click Save.
The filters is added to your KM and available to use in your related content.
Managing existing Knowledge Model objects
You can manage existing Knowledge Model objects by clicking the Options icon:
You then have the following options per object:
Disable scope: By disabling the scope of an object, the object then can't be used anywhere within the package. This is a good option if you want to disable an object but delete it from your KM.
Duplicate: This opens the create object window with the configuration of the object you are duplicating used as a template. When saving a duplicate object, the object ID must be unique.
Delete: This deletes the object from the KM and any references to that object in existing content. When deleting an object, there is no undo or recovery option.
In YAML, filters are defined by using the following value declaration formats:
- id: COUNTRY_FILTER displayName: "Country filter" description: "Filters down to DE and US data" pql: FILTER "TABLE"."Country" IN ('DE','US') global: true
id: A unique technical identifier used to reference this filter. Must be unique within all filters in the Knowledge Model.
displayName: A human-readable label used in the user interface.
shortDisplayName: Shorter human readable label for the object shown automatically on the Views whenever the displayName is truncated. Can contain a max of 20 characters (optional).
description (optional): A human-readable description for the flag.
pql: Contains the PQL query that states the condition used to synthesize the data.
global: Indicates whether the filter is a global filter that will be applied to the PQL of all the objects in the Knowledge Model. Standards PQL filter propagation applies.