Service Virtualization

  • 1.  How to mask a column using NULL values in sql server

    Posted Mar 18, 2017 10:45 AM

    When I am using FIXED function in Masker it passes NULL as string and not as NULL value.

     

    My requirement

     

    Data Before Masking                                    Data After Masking

     

    ABC@uk.com                                                 NULL

    XYZ@uk.com                                                  NULL

    JKL@uk.com                                                   NULL

     

    I want to make email column as NULL after masking.



  • 2.  Re: How to mask a column using NULL values in sql server

    Broadcom Employee
    Posted Mar 20, 2017 11:04 AM

    I have conferred with an SME on this and he confirmed a way to accomplish this.

     

    Please review this function:

     

    Masking Functions and Parameters

     

    FIXED

    The FIXED function masks the column values with the fixed values provided in Parm1.

    Parameters

    • Parm1
      Specifies the fixed value to use.

    Applies to: Date, Character, and Numeric

    Example: The column ACCOUNT_NUMBER is masked with the fixed value 11100022 and the column PERSON_TYPE_CODE is masked with the value CUST.

    Note: If you want to set the value to NULL, enter the string <NULL>. If you want to maintain a space, enter the string <SPACE>. The following table shows the usage:

    TableColumnFunctionParm1Parm2Parm3
    PAYMENT_OPTIONSACCOUNT_NUMBERFIXED11100022  
    PAYMENT_OPTIONSPERSON_TYPE_CODEFIXEDCUST