masking columns in a table that must be masked together

I have a table that looks something like this:

ID, FirstName, LastName, Date, Amount

123,John,Smith,01-Jan, $123

123,John,Smith,01-dec, $456

987,Jane,Doe,01-jun,$555

987,Jane,Doe,01-jul,$666

etc, etc.


I need to mask the Names, but all "John Smiths" must have the same name after masking, and all "Jane Doe" names must be the same after masking.

I can use a substitution rule for the names, but I don't want a different name for each record.  I need to do substitution for distinct names.  I know how to do this with T-SQL, which rule do I use with Data Masker?

thx


Tagged:

Answers

  • Hi @kevinumass thank you for your post!
    Once you have masked the names in the table with a substitution rule, you can run over the table with a table-internal synchronisation rule, which will then take the first value for each key value (in your case ID) and persist the first value down internally to the table.
    Ultimately this should achieve the result you're looking for but if you have any other questions please feel free to let me know!
    Thank you very much.
  • kevinumasskevinumass Posts: 2 New member

    yes, that did work, thank you.

    Now...using my example above, I want to mask the ID, the First Name and the Last Name.

    so ID 123 John Smith becomes ID 876 Fred Jones.

    If I use an internal table rule, I receive a popup that says I should not use the join column as a mask column - "contact Redgate".

    Any thoughts?   thanks

  • Thank you for coming back on this @kevinumass,
    If you would like to also mask the ID, as we will be using this numeric value for the table-internal synchronisation rule, it would be better to first mask the ID separately using a Synchronisation Manager rule, you can read more about this type of rule here: https://documentation.red-gate.com/dms6/data-masker-help/version-6-tech-tips/how-do-i-change-a-primary-key-value-and-all-associated-foreign-keys (I realise that ID might not be the Primary Key in this instance, but it will help keep the spread of keys consistent as well as randomly masked.
    Then you can create a table internal rule for the other fields and make it dependent on the Sync Manager rule and this should solve your problem :simple smile:
    Let me know how you get on and if there's anything else I can do to help!
    Thank you very much.
Sign In or Register to comment.