How do you create a Masking Plan (.plancsv) without exporting one?

We have a list of tables that need to be masked in a database and want to take advantage of this feature, but instructions are sketchy.  We created a MASKING_PLAN table and imported the id_label, table_name, column_name and comments, but we don't know how to use this table to import into a masking set.  The 'csv' file uses a specific '.plancsv' file to import.  I can make a '.plancsv' file from another masking set, but is there a way to use the table created??



  • Options
    Hi @Robb_Keller Thank you for your post.

    The developers have heard of people generating the masking sets programmatically for the rules in the past, but we don't have specific examples of this (and I haven't tried this myself). Ultimately though the underlying DMSMaskSet file is just XML (try opening it in Notepad++ etc and having a look)

    It is technically do-able though and we would approach it as follows:

    1) create a masking set with one rule in it. This rule would act as a template.
    2) use a text editor to split the masking set into 3 parts. 
        a) The first part is everything above the rule
        b) the second part is the rule XML
        c) the third part is everything below the rule
    3) Then I would get a comma delimited list of the table and columns to be masked (and possibly the datasets the column is to be masked with). 
    4) Next write a program which loops through the table/column names and uses the rule XML as a template to do a replace operation
    5) The generated XML for each new rule would be emitted sequentially to the same file.
    6) The top, new middle part, and bottom would be concatenated together and everything should work.

    The big thing to take care of is that the rule numbers are not duplicated. This is very important. Remember the controller itself has a rule number (usually 01) so you should probably start at 02.  

    I hope this helps? Let me know if we can help out any further!
  • Options
    Thanks for the info.  I can cut and paste the tables/columns from a masking set to a different masking set.  However, when I export the masking plan information and try to import it into a new plan it does not import the table/column information.  I have to open the XML and cut and paste the table/column information to the new file.  What is the export/import feature used for?

  • Options
    Thank you for coming back on this @Robb_Keller

    The Export/Import Plan as csv is used for more easily managing your planning as to which fields should be masked. This would allow you to open it in i.e. Exel (e.g. a shared spreadsheet a team use to plan the masking together) and carry out your planning of how to mask outside of Data Masker and then import it, allowing it to update to match what you have done.

    This functionality is not used for modifying or creating the masking rules.

    Let me know if you have any other questions - thank you very much.
Sign In or Register to comment.