rheinwerk-verlag/pganonymize

Schema compatibility (dbtoyaml)

Opened this issue · 1 comments

Thanks for the great tool!
It would be nice if this is compatible with dbtoyaml: https://pyrseas.readthedocs.io/en/latest/
Currently, to make the yaml compatible, it is required some transformation that could be avoided.

hkage commented

Hi, thanks for the feedback and I'm glad you like the tool.

It think using the same notations for the YAML definition like the output from dbtoyaml should be possible and it would make writing schema files more easy. This would also be an issue for us if we start using the tool "productiv" and our database increased over time.

I would have to check if there are any keywords clashing in both schemes first, but I think there aren't any. The only "problem" I see is that a YAML file generated from dbtoyaml would still contain a lot of values not necessary for pganonymize and the file could be a bit bloated. And on the other hand if the DB schema changes for a lot tables and columns you would have to re-create the file with dbtoyaml and add all the pganonymize definition afterwards. But that is something pganonymize couldn't prevent and has to be done manually.