I want to mask certain fields in my data like email id and mobile number since it's sensitive data before sharing the same with anyone. Both the fields vary in length.
Please help me with a formula
For masking of text files, probably the easiest thing to do is to use a Multi Field formula. Remember to untick the Copy Output Fields.
A simple method is to just use the MD5 Hash of the input string. In order to avoid length issues you can truncate it to the length of the original string:
LEFT(MD5_UNICODE([_CurrentField_]), LENGTH([_CurrentField_]))
The benefit of this approach is the mapping will always produce the same output. This means keys and joins should still work.
Masking numbers can be done in a separate multifield formula by multiplying the input by a Random number. If you want to ensure that the mapping is consistent this is a harder process.
Hi,
Thanks for your post about masking. it works now but I have a quick question. actually I have my file in SQL server and its large in size so I am using the in - database function (see the attached file). so how to use this formula using the in-database function in Alteryx ?
Thanks,
VJ
Hi
Thansk for a very good masking solution. It is very useful and would be even more useful if I could unmask the same data.
How can this be done?
Regards Mats
Instead of MD5_UNICODE , which all the other encryption keys available.
Can you please share the function to be used in multi field formula like MD5_UNICODE([_CurrentField_]) for a few of the below hash types.
SHA-1
SHA-256
Whirlpool
xxHash
MurmurHashSpookyHashCityHash
ChecksumCRC-16CRC-32CRC-32 MPEG-2CRC-64
BLAKE-256BLAKE-512BLAKE2sBLAKE2bECOHFSBGOSTGrøstlHAS-160HAVALJHMD2MD4MD6RadioGatúnRIPEMDRIPEMD-128RIPEMD-160RIPEMD-320SHA-224SHA-256SHA-384SHA-512SHA-3 (originally known as Keccak)SkeinSnefruSpectral HashStreebogSWIFFTTiger