rwnx / pynonymizer

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

Connectionstring fix #167

Closed manmetbaardt closed 3 weeks ago

manmetbaardt commented 2 months ago

Last week I installed the lastest version, with the verbose setting fixed, and after a few tests, I found out why the connectionstring was not working. In the file pynonymizer_env\Lib\site-packages\pynonymizer\database\mssql__init__.py around line 77, the variable db_host is hardcoded as local. image After commenting this line, the package worked with command below pynonymizer --strategy "C:\Temp\strategy_MISC.json" --db-type mssql --only-step ANONYMIZE_DB --db-host 'xxxxxserverxxxx.xxx.xxx.xx' --db-name 'xxx_xxx_Anonymous' --db-user 'pynon' --db-password 'pynon' --verbose Would it possible to remove the line from the package ?

rwnx commented 1 month ago

It's there because the dump db options dont work when the server is remote. I think this could be replaced with a warning, rather than an override. I will schedule this for the next version.

rwnx commented 3 weeks ago

Released a fix for this in v2.4.0 today!