Hello,
I have large MySQL dump files formatted as a set of SQL statements. The statements are the ones to set up the database structures and then to insert data into tables.
I need to process data in the files, remove sensitive data from certain columns, replace it with something other which looks like a valid data for each corresponding column, but doesn't contain any sensitive details. The output is going to be in the same format -- SQL formatted MySQL dump file.
This needs to be done without loading the contents of dump file into any database.
Looks like feasible. We read the file, recognize where the data fields start and end in the stream and replace those pieces of data with another data -- the 'anonymized' one.
The difficulties start with the realization that all the data in the INSERT statement is one long line with no end-of-line characters. Not a row of data per line -- just one long line which represents all data as ('column1', 'column2'),('a','b'),('something','something other') ...
Another piece of complexity comes with the realization that the data can contain embedded quotes, commas and parentheses.
The size of data being processed is much greater than the amount of RAM available on the machine which is doing the processing.
Can you please suggest some ideas about the possible implementation?
Thank you
In reply to Masking data in a MySQL dump file. Ideas? by dliakh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |