Skip to main content

Troubleshoot the PII removal mapping

Source fields remain​

Compare the input schema with every configured path. Check nested objects and case differences; the example mappings do not discover fields dynamically.

Derived fields disappear​

A later root = ... assignment can replace fields added earlier in the same mapping. Build the new root first, or store derived values in variables before assigning them.

Hashes change between runs​

Confirm that every process receives the same non-empty salt without printing the secret:

for key in IP_SALT EMAIL_SALT USER_SALT; do
if test -n "${!key}"; then
printf '%s=set\n' "$key"
else
printf '%s=missing\n' "$key"
fi
done

Review an output file​

Use explicit field checks as a starting point, then add paths from the actual schema:

jq '{
direct: (has("email") or has("ip_address") or has("user_name")),
payment: (.payment_method | has("full_number") or has("expiry")),
coordinates: (.location | has("latitude") or has("longitude"))
}' processed.json

This check covers named fields, not all identifying data. Compare the result with the full configuration and the intended output contract.