Operators
On This Page
You can use a variety of mathematical and logical operators such as Is Greater Than, In Range, Is True, or Has Field to filter Event Types, Events and Fields based on their values and properties.
This section describes all the operators available for building Transformations and illustrates their usage through a sample Hash Fields Transformation.
Equals and Not Equals
Description: | Filter an Event or field if its value is equal or not equal to the specified value. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Enter value: Provide a value to compare the Event or field value with. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All Fields with Name = Marks
.
Result:
All fields with name = Marks
are hashed as per your selected algorithm (MD5).
Greater Than and Greater Than Equal To
Description: | Filter an Event or field if its value is greater than or greater than equal to the specified value. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Enter Value: Provide a value to compare the Event or field value with. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All fields with value greater than 40
.
Result:
All field values greater than 40
are hashed as per your selected algorithm (MD5).
Lesser Than and Lesser Than Equal To
Description: | Filter an Event or field if its value is lesser than or lesser than equal to the specified value. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Enter Value: Provide a value to compare the Event or field value with. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All fields with value lesser than 40
.
Result:
All field values lesser than 40
are hashed as per your selected algorithm (MD5).
In Range and Not In Range
Description: | Filter an Event or field if it lies or does not lie in the specified range. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Enter Start and End Value: Provide a start and end value to compare your Event or field value with. |
Transformation Considerations: | The end value is not included. |
Example:
Filters:
Event Type = All Events.
Fields = All fields with Start Value = 5
, End Value = 60
.
Result:
All field values between 5
and 60
are hashed as per your selected algorithm (MD5).
![Transformed Events where field values in range 1000, 2000]https://res.cloudinary.com/hevo/image/upload/v1650421031/hevo-docs/TransformationsImages8502/In-Range-1.png)
In and Not In
Description: | Allows you to specify a comma-separated list of values in a filter. |
Sample Usage
Scenario: In the Event Type, week1.cp
, if any of these fields: Units07
, Units08
, and Units09
have a value less than 100, change it to 100.
Settings: We can use the Change Field Values block for the Transformation, and the In operator to select the three fields at once, as follows:
Result: When you test the Transformation, as the values of the fields Units07 and Units09 match the criteria, these are updated to 100.
Starts With
Description: | Filter an Event or field if it starts with the specified value. The value must be of type String . |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Enter Value: Provide the starting string to identify Events or fields to be filtered. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All fields whose names start with Student
.
Result:
All field names starting with Student
are hashed as per your selected algorithm (MD5).
Matches
Description: | Filter an Event or field if it matches the specified pattern. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | - Regex: Provide a Regular Expression to specify your pattern. - Complete String: Provide a string that specifies your complete pattern. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All fields with name = test
whose value contains the string abcd
.
Result:
All fields with name = test
whose value contains the string abcd
are hashed as per your selected algorithm (MD5).
Is True and Is False
Description: | Filter an Event or field if its value is true or false. |
Filter On: | All Events, Event Type, Event Field. All Fields, Field Name, Field Value. |
Settings: | Select a Boolean Value. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All Fields with Name = is_bizzed
having value true
.
Result:
All fields with name = is_bizzed
whose value = true
are hashed as per your selected algorithm (MD5).
Matches Type and Not Matches Type
Description: | Filter an Event or field if its value matches type or not. |
Filter On: | All Events, Event Field. All Fields, Field Value. |
Settings: | Select a Data Type. For example, Boolean. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events.
Fields = All fields with value matching type Numeric
.
Result:
All field values matching type numeric
are hashed as per your selected algorithm (MD5).
Has Field and Does Not Have Field
Description: | Filter an Event if it has or does not have a specific field. |
Filter On: | All Events, Event Type. |
Settings: | Enter Field Name: Provide a field name that you would like your event to have. |
Transformation Considerations: | None. |
Example:
Filters:
Event Type = All Events with Field Name = Result
.
Result:
All fields of events with field name = Result
are hashed as per your selected algorithm (MD5).
Revision History
Refer to the following table for the list of key updates made to this page:
Date | Release | Description of Change |
---|---|---|
Nov-29-2022 | NA | Updated the In and Not In section. |
Apr-25-2022 | NA | Updates the screenshots to reflect the latest UI. |
Nov-09-2021 | 1.75 | Renamed Like operator to Starts With to accurately reflect the functionality. |
Sep-09-2021 | 1.71 | Updated the page to include a description and an example for all the Operators available for defining the filters. |
Jun-14-2021 | 1.65 | New document. |