Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to skip rows #9

Open
Lusitaniae opened this issue Aug 1, 2020 · 0 comments
Open

Ability to skip rows #9

Lusitaniae opened this issue Aug 1, 2020 · 0 comments

Comments

@Lusitaniae
Copy link

Lusitaniae commented Aug 1, 2020

We're currently using production database in dev.

We plan to improve it by anonymizing the user data.

However we have some test/dev/admin accounts with a variety of roles and associated data which we want to preserve.

Would be nice being able to skip any transformation to a row if a condition matches. Example config we'd use to achieve this

      "tableName": "users",
      "ignore": [
        {
          "field": "mail",
          "position": 6,
          "value": "[email protected]"
        },
        {
          "field": "mail",
          "position": 6,
          "value": "[email protected]"
        }
      ],
      "fields": [

As a work around:

We take 2 mysqldumps, the first one with all data going through anonymization.

The 2nd dump is appended to the original with "REPLACE INTO" queries with the users we plan to keep as is.

mysqldump --no-create-info --where "email like '%admin.com'" --replace application user_data > own_users.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant