machbarmacher/gdpr-dump

Integrate Faker - discussion

Closed this issue · 2 comments

Hi @axel-rutz

Thanks a bunch for pushing this. I think it's a super exciting approach that's able to be used in several places.

Second, I've been thinking about the approach and one of the things I was thinking is that perhaps we might want to integrate Faker into the process, rather than the expressions based approach (or, better, the two might live side by side).

I've been doing some work on my side, and while it's a total WIP at the moment (in particular, I'm really uncomfortable with the way I've abstracted the expression stuff, and will rewrite ASAP), I thought that since I've got something this would be a good opportunity as any to get talking about it.

So what I've done for now is changed up the --gdpr-expressions switch a little to accept something like this

--gdpr-expressions=\'{"fakertest":{"name":{"transformer":"faker","formatter":"name"}, "telephone":{"transformer":"faker","formatter":"phoneNumber"}}}\'

Which marks particular columns as engaging Faker and which formatter will be used for output. Obviously this could be expanded to include Faker arguments etc. if we wanted them.
If an object isn't passed, it interprets it as a DB expression and uses your current approach.

I'd love to get a discussion started about this.

In fact i'm being sucked in by other issues these days, so i'm not able to push this, and am so very much happy that you are building on it!

I'd love to see a minimum viable product to get more people and thought that simple constant expressions are "good enough" and other approaches might distract from that.

That said, using faker might be quite useful, so it has all my blessing!

merged. Closing.