The validator is a command line tool run by the server. Through plug-ins called 'rules' it can validate and perform simple edits to input files.
It can also be run directly from the command line so that it can be launched from schedulers such as
cron or from pipeline tools such as Luigi.
The validator configuration file to use. By changing the configuration file the behavior of the validator can easily be changed. By changing the configuration file the validator can be pointed at different sets of rules, or output to different directories, etc.
The given configFile argument should either be an absolute path on the local file system or a path
relative to the working directory of the validator application.
See the [Configuration File](#Configuration File) section for a description of the contents of the configuration file.
The id of the ruleset to process.
The name of the input file to validate. This overrides any source file specified in the ruleset.
The name of the output file (the file after all the rules have been run). This overrides any target file specified in the ruleset. If no output file is specified on the command line nor in the ruleset then the rules are run, error reports are generated, but no output file is produced.
The path to a ruleset override, which replaces properties on a default ruleset allowing one ruleset file to be used to validate and edit many different files without changing the default ruleset file. Additionally it allows overriding properties on the importer and exporter used by the validator, for example, to use different authentication values for different files or databases or different file encodings.
In the default Docker release, in the config directory should be a validatorConfig.json file that
tells the validator where the folder required to operate properly can be found. (The name and location
of the file is not significant and in other releases could be placed elsewhere and named something else.)
Validator config structure and properties can be found here
To validate a file three things are required, a ruleset, a rule files, and an file to validate. The ruleset describes how the input file is retrieved from a remote location, a sequence of rules to run the input file through, and how to export the resulting file and log results to a potentially different remote location.
Set up the validator configuration file as described above. The validator will use the values in this file to locate the ruleset and rules.
Place your rule files in the rules directory as defined in the validator configuration.
If you are using an importer and/or exporter script place it/them in the root directory.
Define your ruleset file. For simplicity add rules one at a time testing the ruleset workflow after each addition. This will make debugging your ruleset easier.
Run the validator from the command line passing in at least the validator configuration file and ruleset.