Masking Algorithm for unique number generation

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • Answered
How can I generate 8 digit unique numbers on a database for a primary key which includes 150000 rows in that table via Segmented Mapping algorithm ?

For Example I can use Mapping algorithm for this masking job but I have to put 150000 rows and update it everytime when there are data changes..

Do you have any idea to use other algorihtms ?
Photo of Cihan

Cihan

  • 300 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Hims

Hims, Employee

  • 2,542 Points 2k badge 2x thumb
Official Response
Hi Cihan,
Segmented Mapping Algorithm is a patented technology which segments target values and then masks those segments. A Segment Mapping algorithm needs to be as wide as the largest (longest) values in target column. It will always generate 1:1 unique values and maintains numeric/Alphanumeric types ( Do not give and range/min-max) values.

Please note the algorithms do not add /delete rows and maintain NULLs and EMPTIES for refrential integrity.

For more info please refer:
https://docs.delphix.com/display/DOCS50/Managing+Algorithm+Settings

Thanks
--Hims
Photo of Cihan

Cihan

  • 300 Points 250 badge 2x thumb
Hi Hims

I actually know how to use it but I tested for the scenerio I explained in my question actually and I got error i can send it later but it was somethhing like can not insert duplicate values in the primary key in .

You know every segment is limited to max 4 digit when it masked the real value between 1-9999 for the first 9999 records it gives error for the 10000th record, segmented mapping is for unique numbers and also that column is primary key u can not assign duplicate number according to the SQL db ;)) thats why i am asking Am I doing something wrong ?
Photo of Mary

Mary

  • 182 Points 100 badge 2x thumb
Hello, 

I am getting the same problem. Have you solved this somehow?

Thank you, 
Mary
Photo of Hims

Hims, Employee

  • 2,542 Points 2k badge 2x thumb
Hi Mary,
Your individual scenario may differ but as a thumb rule, use a Segmented Mapping Algorithm with segments wide enough for the Max width of the value inside that column. An SM algo should be used for any column with a Unique Index on it.
e.g for a 10 digit value we may create an SM algo with 3 Alphanumeric Segments of width 3X3X4.
The UQ constraints/Indices needs to be disabled during the period while masking job is running.