Delphix Products

  • 1.  masking with zero

    Posted 03-28-2018 03:07:00 PM
    Hello,

    I want to know if it's possible to create an algorithm in the Masking engine that can replace any number within a string column by zeros (as long as initial number is)
    I tried to make one with segment mapping, but i can't make range between 0 and 0 for example.

    here is an example of results that i want :

    BEFORE_MASKING  AFTER_MASKING
    1234            0000  123             000  045678          000000  
    etc.

    I there a way to do such thing with masking algorithm ?

    thanks for your help
    #Masking


  • 2.  RE: masking with zero
    Best Answer

    Posted 03-28-2018 03:30:00 PM
    Hi Nicolas,

    You can use the Segmented Algorithm. Create each segment as Alphanumeric and take length of segment as 4. 

    For each segment, for each character, define the range of mask values as 0,0.

    Just tested this and works fine :)

    Number of segments you will need to define will depend on the longest length you expect to handle. So, for instance, you expect the longest length as 26, then, you should define 7 alphanumeric segments, each of length 4, and within each segment, for each character define range of mask values as 0,0

    I hope this clarifies.

    Regards,
    Mayank


  • 3.  RE: masking with zero
    Best Answer

    Posted 03-28-2018 03:47:00 PM
    Thanks a lot Mayank

    It's exactly what i was looking for.
    Perfect !
    I was trying to use min and max instead of range (i though range was "steps" between numbers).

    WIth your example, it's working for me too

    Thank again for your help


  • 4.  RE: masking with zero
    Best Answer

    Posted 03-28-2018 07:05:00 PM
    You should also be able to do this with a redaction algorithm, changing any number with 0.  I haven't tried this out but it should work with fields longer than those handled by segmented mapping.  It's probably a more expensive algorithm from a processing time requirement though.
    Regards,
    Gary


  • 5.  RE: masking with zero
    Best Answer

    Posted 03-28-2018 10:45:00 PM
    I checked this out and found that the redaction algorithm did not work as it did not iterate across all numbers only across single numbers.

    so in a text field "1234 1 2 3 4"
    Using a regular expression redaction with [0-9]* and replacement of 0 you get:
    "0 0 0 0 0"
    Using a regular expression redaction with [0-9] and replacement of 0 you get:
    "1234 0 0 0 0"
    Using a regular expression redaction with a text file list of numbers from 0 to 9 and replacement of 0 you get:
    "1234 0 0 0 0"
    Mayank wins... ;-)


  • 6.  RE: masking with zero

    Posted 03-29-2018 06:26:00 AM
    Actually this should work too, I am surprised that it is taking 1234 as a single number instead of 4 digits.