How to create file name patterns of file masking in Delphix 5.2.6.1 version.

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered
Photo of Ashok Kumar

Ashok Kumar

  • 240 Points 100 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of John Hanratty

John Hanratty, Employee

  • 690 Points 500 badge 2x thumb
Official Response
Hello Ashok: java based regular expressions are used for creating patterns in file masking.  

Example:          To mask only/all files like “HR_File” with a date stamp

Pattern:            (?>(^HR_FILE_)[0-9]{8}(.txt)) 

File names found are: 

               HR_File_20150912.txt, HR_FILE_20150914.txt, HR_File_20150916.txt

File name not matched may be: 

               JH_HR_File_33333333.txt, HR_File_not.txt, XX_File_20100101.txt

Additional help in writing regular expression can be found at Regex Planet 

http://www.regexplanet.com/advanced/java/index.html


- Jack 

Photo of Ashok Kumar

Ashok Kumar

  • 240 Points 100 badge 2x thumb
Thank you so much for your help John
Photo of Ashok Kumar

Ashok Kumar

  • 240 Points 100 badge 2x thumb

Hi,

 

I have tried to mask below 2 files.

Test_20190207.txt,Test_20190206.txt

Test_20190207.txt

Name,No

•Ram,501

•Bhargav,502

•Nikunj,503

 

Test_20190206.txt

Name,No

Ashok,401

Siddharth,402

Anurag,403

I am using (?>(^Test_)[0-9]{8}(.txt))  Regular expression in file name pattern while creating ruleset.

I have added header for these two files individually and I applied FULL_NM_SL (for Name column) and ACCOUNT_SL(For No column).

 

While running masking job it has masking 2nd file column name also. But I got below results

 

Test_20190207.txt

Name, No

Ferguson Buckingham,805

Rory       McGrath,809

Ramsey                Bain,800

 

Test_20190206.txt

Romanth Golly,Nx

Romanth Foss,705

Radford                Chittenden,709

Romeo Emerson,700

 

Did I miss any input in this? Kindly please help me on this issue.


(Edited)