Hash Key

Perform MD5 / SHA256 hashing algorithm on a source key to a new destination key

Hashing your data is a great way to validate the authenticity and integrity of your data. The Hash Key action hashes the value of a key in every record. When applied to your pipeline, the Hash Key action will hash the value of every occurrence of a specific key and return the hashed algorithm value and a new key name. The Hash Key action provides the MD5 and SHA256 functions for hashing your keys.

For example, given the following sample website log data.

{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3,"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4,"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user_id":1,"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user_id":5,"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1,"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user_id":2,"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user_id":3,"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user_id":1,"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user_id":2,"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user_id":2,"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user_id":1,"page_id":50,"action":"view"}

To hash the value of every occurrence of user_id, from the actions drop-down menu of your processing rules tab, select Hash Key. Add the key you wish to hash, what you wish to name the destination key for your hash value, select your hashing algorithm and the scheme of your output, then click Apply.

Your processing rule will now hash the value of every occurrence of the user_id key and return it as customer_id and the hashed value.

\

\

Last updated