The following Jinja and regex rules are provided as samples of the type of rules that you can create for normalizing ingested data values for fields.
Table: Regex rules
| Rule | Matching pattern |
| ^(Ubuntu|Fedora|Debian)$ | Ubuntu, Fedora, Debian |
| ^Windows (XP|7|10)$ | Windows XP, Windows 7, Windows 10 |
| ^macOS (Catalina|Big Sur|Monterey)$ | macOS Catalina, macOS Big Sur, macOS Monterey |
Table: Jinja rules
You must adhere to the format that is provided for the Jinja rules in the table. To identify the field value, you must use the word value.
| Rule | Matching pattern |
| {% if value == "Ubuntu" %}True{% elif value == "Fedora" %}True{% elif value == "Debian" %}True{% else %}False{% endif %} | Ubuntu, Fedora, Debian |
| {% if value == "Windows XP" %}True{% elif value == "Windows 7" %}True{% elif value == "Windows 10" %}True{% else %}False{% endif %} | Windows XP, Windows 7, Windows 10 |
| {% if value == "macOS Catalina" %}True{% elif value == "macOS Big Sur" %}True{% elif value == "macOS Monterey" %}True{% else %}False{% endif %} | macOS Catalina, macOS Big Sur, macOS Monterey |
Useful links
Jinja: Template Designer Documentation
Comments
0 comments
Please sign in to leave a comment.