Auto-fixing validation errors

If anonymize fails with validation errors, it is possible to attempt to "auto-fix" any issues by passing the --autofix-file command line parameter.

Doing so will create a file at the given path that can be used as an options file (passed to masking via the --options-file command line parameter) to make anonymize run by ignoring any errors that occurred previously.

Generally, tables/columns that caused validation errors will be simply excluded via the generated file. In some cases however, a different configuration will be used.

Not all validation errors can be auto-fixed, so it is possible to generate an auto-fix file and anonymize still fail when using it.

Generating a file

If anonymize fails with validation errors, you can add the --auto-fix command line parameter to run anonymize again to generate an options file with a suggested workaround for the errors:

  1. rganonymize mask
  2. --database-engine SqlServer
  3. --connection-string "[connection string]"
  4. --masking-file masking.json
  5. --auto-fix auto-fix.json

This will generate an options file (auto-fix.json) that can be used to bypass the errors on next run:

  1. rganonymize mask
  2. --database-engine SqlServer
  3. --connection-string "[connection string]"
  4. --masking-file masking.json
  5. --options-file auto-fix.json



Didn't find what you were looking for?