Test Data Manager

 View Only

Tech Tip: Example of FDM rule that will mask an email address and keep current domain

  • 1.  Tech Tip: Example of FDM rule that will mask an email address and keep current domain

    Posted Jan 25, 2018 11:28 AM

    The following sql works to get domain for a email address: 
    select regexp_substr ( email, '(@[^.]+\.+[a-zA-Z]{3,}|[a-zA-Z.]{30,})' )from creditcard_e.applicant; 

     

    When I try and exec a sqlfunction it changes to: 
    Error executing SQLFUNCTION select SQL:select regexp_substr ( 'smist02@ca.com', '( @[^.] + \. + [a - zA - Z]{3 , }|[a - zA - Z.]{30 , } )' )from creditcard_e.applicant ) from dual 
    >ORA-00933: SQL command not properly ended 

     

    Is there a way to get rid of the first "select" and the "from dual"? 

     

    The table for email column is the same. I have removed the actual table “creditcard_e.applicant’. The select and the from dual are being added by FDM. 

     

    Function SQL 
    app_lastname || regexp_substr ( email, '(@[^.]+\.+[a-zA-Z]{3,}|[a-zA-Z.]{30,})' )) 

     

    Message in execution 
    Error executing SQLFUNCTION select SQL:select 'Kruytzer'|| regexp_substr ( 'smist02@ca.com', '( @[^.] + \. + [a - zA - Z]{3 , }|[a - zA - Z.]{30 , } )' ) ) from dual 

     

    Do you have an example of an FDM rule that will mask an email address, but keep the current domain information? 

     

    To see the answer to this question, please go here- https://support.ca.com/us/knowledge-base-articles.TEC1594728.html