masking
masking copied to clipboard
adding a configuration type (masking.yml) that doesn't change data cardinality
background
when we want to use anonymized data for performance tuning purpose, we don't want to change data cardinality in records, otherwise, it is not showing the correct sql execution plan.
grammar
pass with digit
users:
email: anonymized+%{hash,4}@example.com
expected result
before
expected result
MySQL [mydb]> SELECT id, email FROM users ORDER BY id;
+----+----------------------------+
| id | email |
+----+----------------------------+
| 1 | [email protected] |
| 2 | [email protected] |
| 3 | [email protected] |
+----+----------------------------+
MySQL [mydb]> SELECT id, email FROM users ORDER BY id;
+----+----------------------------+
| id | email |
+----+----------------------------+
| 1 | [email protected] | <- same data outputs same data
| 2 | [email protected] |
| 3 | [email protected] | <- same data outputs same data
+----+----------------------------+
Tech tips
- it can be a performance regression
this is same with #71