JackHQ

0 notes

De-Identify your data or Fakerize your data

Ever need to pull a copy of your production data?

Ever need to create a demo sandbox for your sales team?

We did.

So we created a gem called Fakerize, it is currently going though some internal testing, but we will launch as open source as soon as we have all the issues worked out.

This Command Line Interface, makes it very easy to de-identify your database.

You simply create a config yaml file with a map of all your models and a list of fields that you want to fakerize.

---
:models:
-
   :name: :patients
   :options:
     -  
       :field: :last_name
       :fakerize: Name.last_name

Save as config.yml

Then install the fakerize gem

gem install fakerize

Then if you have a mysql database run:

fakerize database:convert mysql://user@localhost/mydb config.yml

And it will proceed to de-identify your database.

COOL!

Now you can push your database to a demo app or just hack on your database locally, but feel better that you are not carrying around your clients liability in your computer.

TODO!

Just the beginning!

We plan add a feature to allow you to use it for any data store.

Right now, it uses the Sequel Toolkit and can connect to any adapter that the Sequel toolkit uses, but we are planning to allow you to create adapters for any datastore.

Also we plan to add a “database:clean”, that will allow you to specify models that you want completely emptied!

Filed under ruby rubyonrails