Mask Out Email/Phone 🛡️

Danny Roden
Danny Roden Administrator
edited December 2023 in Functions library

Summary

This package contains 2x functions to help with anonymising certain input values, whilst leaving an output that can still be used for non-sensitive analysis.


Mask Out Email

image.png

This function masks characters in the sensitive part of an input email address with 'X' characters, leaving the domain untouched (e.g. "Danny@experian.com" becomes "XXXXX@experian.com")

The idea here is to leave an output value that can still be used for analysis on length (e.g. to support data migration planning into a target field with character restrictions) as well as any analysis at a domain level (e.g. for B2B contact data to understand data spread per company).

See below for a preview of the definition of this function as well as some sample outputs:

image.png


Mask Out Number

image.png

Similarly this function masks out characters with an 'X' however this is built specifically to be applied to numbers (e.g. phone numbers, credit card numbers) and as such leaves the last 4x characters as is (so as to be sufficient for confirmation purposes). It also leaves input alpha character unaltered.


See below for a preview of the definition of this function as well as some sample outputs:

image.png


Compatibility:

These functions are compatible with all instances of Data Studio from v2.1.11 onwards.

[dl-button|Download|https://us.v-cdn.net/6031645/uploads/OKJAYJZLHCFU/mask-out-emailphone.dmx]