Test Data Manager

 View Only
  • 1.  Custom Masking Functions - column names as parameters

    Posted Dec 23, 2020 11:58 AM

    Hi,

     I created a Custom Masking Function using the IMaskFunction interface, as described in Create Custom Masking Functions.

    My function receives 2 parameters as input. I tested it several times with literal values and it works just fine.

    A customer asked me whether it was possible to have these 2 parameters coming from columns from the database. Of course I did not implement anything in my code to handle the column names, but I tried anyway and it failed as expected.

    I know that the standard CONCAT function can receive literal values as well as column names. 

    Is there anything in the interface implementation that allow us to parse the information from the other columns without the need to code a SQL query?

    If implement a SQL query is the only way, is there a way to capture the active connection information to use, instead of requesting this as an input parameter?

    Do you know how it is implemented in the CONCAT function?

    Best regards,

    .



  • 2.  RE: Custom Masking Functions - column names as parameters

    Broadcom Employee
    Posted Dec 28, 2020 09:30 AM

    Hi Aldo, there is no ability to pass other column values in custom masking functions at this time.   Please open an Enhancement Request using a Support Ticket.

    Scott




  • 3.  RE: Custom Masking Functions - column names as parameters

    Posted Dec 28, 2020 09:55 AM

    Hi Scott,

    How are you?

    I am working with IntelliJ and it opens the .jar files we use as reference. I can see that inside the com.grid_tools.products.datamasker package there are much more than just the IMaskFunction interface. In the class Datamasker, there are the public classes getOrigVal and getMaskedVal. 

    Do you think these can be used?

    Regards,

    Aldo




  • 4.  RE: Custom Masking Functions - column names as parameters

    Broadcom Employee
    Posted Dec 28, 2020 01:19 PM

    Aldo,

    IMaskFunction is the only supported & documented interface for custom masking routines.   If you choose to reverse engineer other classes/interfaces, there are no guarantees that they will not change in future releases.

    Scott




  • 5.  RE: Custom Masking Functions - column names as parameters

    Posted Apr 18, 2023 08:37 AM

    Hello,

    I created an Idea for this. Those who can find it useful can vote for it.
    https://community.broadcom.com/idea/tdm-fdm-pass-columns-as-parameters-for-custom-functions

    Thank you!
    Marius