Step 3: Transform the email address
Extract the domain while the source value is available, remove the address, then add the derived fields.
Email mapping
- mapping: |
root = this.without("email")
root.email_hash = this.email.hash(
"hmac_sha256",
env("EMAIL_SALT")
).encode("hex")
root.email_domain = this.email.split("@").index(1)
Validate missing and malformed addresses before adapting this fragment. A domain or stable hash may still be sensitive in a particular dataset.