Test Data Manager

 View Only
  • 1.  FDM - Mask Brazil Tax ID

    Posted Apr 12, 2019 07:33 AM

    There is several functions available for other countries, is there custom masking functions for Brazil cpf (Individual) and cnpj (corporation) tax ids?   We need to replace actual tax id with another valid tax id consistently.



  • 2.  Re: FDM - Mask Brazil Tax ID

    Posted Apr 12, 2019 08:35 AM

    I do not know the details of how a Brazilian tax id is generated or any format restrictions, but the first thing to try in these sorts of circumstances are the functions FORMATHASH and FORMATMASKMasking Functions and Parameters - CA Test Data Manager - 4.7 - CA Technologies Documentation.  Both functions will preserve the format of the field but mask letters and numbers (eg, AB 12 34 56 c may become NM 98 27 45 z or similar - all other characters such as ',./:' will be unchanged).

     

    If these do not satisfy the requirements, I would then look at writing a scalar SQL function and calling it in-line using SQLFUNCTION .

     

    Finally, if needed, you can create your own custom Java function: Create Custom Masking Functions - CA Test Data Manager - 4.7 - CA Technologies Documentation (the existing published functions you mention are effectively productized versions of that same).

     

    Please let us know if this helps resolve your requirement.



  • 3.  Re: FDM - Mask Brazil Tax ID

    Posted Apr 16, 2019 10:25 AM

    We don´t have it...

    I have the same trouble here in my client (Brazil)...

    As Adrian said, you will have to create a java function (fastdatamasker), or a SQL function/procedure to use with datamaker...

    It´s simple to create a valid CPF/CNPJ number, or mask one with a valid value...