Smart Filter


One challenge when checking for changes in a certain Project is managing tag values that are constantly changing. Tags for counters or position measurements may change on every backup, but often aren't meaningful enough to display in a diff.
For example, even when the Ignore Tag Value Changes option is turned off, there might still be irrelevant tag value changes included in a diff.
With Copia's Smart Filter feature, certain tag value changes can be filtered out from the diff so you only see what is relevant.

Configuring for the Smart Filter

To set up a Smart Filter, first isolate a backup result from the Job History tab. Click on the View Details button to load the diff.
Before enabling the Smart Filter, you'll first need to declare your configurations. Choose the Add Config to Enable Smart Filter link.
This will launch you into a special configuration file -- varignore.yaml-- which uses a markup language called YAML. The list of rules for a Project can be added as a list underneath the Project name. In this example, we are ignoring all controller tags that end in _Pos.
Add an optional description to the config and commit it to the main branch by pressing the Commit Changes button.
Navigate back to your isolated backup and view its diff. When you enable the Smart Filter toggle, the diff should filter out the position tags that were declared in the config. Additionally, a helpful counter will display the number of filtered tags.

Example Filter Rules

Wildcards (*) can be placed anywhere within the rules to match multiple tags. The following table gives examples of tag filtering rules.
Ignores a controller tag named TagName.
Ignores all controller tags.
Ignore all controller tags with names ending in _Pos.
Ignores a tag named TagName in the program named ProgramName.
Ignores all tags for a program named ProgramName.
Ignores all program tags.

Example Filter File

Below you'll find a sample varignore.yaml file with some real-world examples. You can use this as a starting point when initially creating your config for the Smart Filter.
# varignore.yaml
# This file is used to ignore tags in a diff. Don't modify the name of the file
- Controller.Tags.* # Ignores ALL controller-level tags changes in this project
- Controller.Programs.*.Tags.* # Ignores ALL program-level tag changes
- Controller.Tags.<tag_name> # Ignores changes to the tag named <tag_name>
- Controller.Tags.HMI_* # Ignores all controller-level tags that begin with 'HMI_'
- Controller.Tags.Local:6:I.* # Ignores all input tags for this backplane module
- Controller.Tags.Local:6:* # Ignores all tags for this backplane module
# If there are multiple projects within the repo, create separate entries for each project
- Controller.Tags.*

Change Detection

The config for the Smart Filter will also impact whether the backup reports differences found in the Project. Any tags that are filtered from the diff view will also be filtered when checking for differences between the Project in the repository and the Project on the Device.