How to reduce rows in table
Perchik777
Posts: 1 New member
Which rule use for reduce rows in big table?
how to delete some rows taking into account the preservation of data integrity (Foreign Keys)?
how to delete some rows taking into account the preservation of data integrity (Foreign Keys)?
Tagged:
Answers
Thanks for your question and sorry for the delay in getting back to you!
For the moment, this is not possible to do in Data Masker, unfortunately.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Deleting rows is incredibly difficult to do in any circumstance however if you are able to write the T-SQL to delete the rows, you could use this in combination with Data Masker, and your existing masking rules to achieve the result you're after.
E.g. you could write your own Command rule (Masking Rules > Advanced) to disable certain constraints, then delete some data i.e. DELETE FROM dbo.Customers WHERE LastActivityDate < '01-01-2010' and then re-enable the constraints afterwards.
Command rules allow you to use GO statements to batch certain queries as well, so make sure to select the correct options. There was an example of a similar workflow alongside Redgate SQL Clone here: https://www.youtube.com/watch?v=fMOvZgGM3gY&ab_channel=RedgateVideos
I should be clear though - Data Masker is not a subsetting tool, so the work that goes into this will have to be your own, however it is of course a possibility.
Let me know if you have any additional questions! Thank you very much.