rwnx / pynonymizer

A universal tool for translating sensitive production database dumps into anonymized copies.
https://pypi.org/project/pynonymizer/
MIT License
105 stars 38 forks source link

Change/Ignore exception handling during anonymization #96

Closed rwnx closed 2 years ago

rwnx commented 2 years ago

Possibly not throw an exception if it cannot find a table/column . This will ensure that the tool can anonymize whatever valid tables and columns exist and possibly give a report , at the end that the following tables/columns could not be anonymized since they could not be found .

Leading from #94, a missing or changed table name can cause anonymization to fail half-way. It would be better if, during the anonymization step, pynonymizer attempted to "do everything it can" even if the resulting exit code is still !=0.

In addition to this, adding an option to ignore some errors during anonymization e.g. --no-fail / --ignore-anonymization-errors (TBC) that would allow users to explicitly override the failure behaviour would go a long way!

rwnx commented 2 years ago

The first part of this change (continue on anonymizing error, but throw an error anyway) is going out in v1.22.0. We can tweak and refine this behaviour in this thread. I'd like to keep this issue open to discuss options for ignoring errors

rwnx commented 2 years ago

Now that #103 is merged I'm closing this issue.