Why data anonymization is not working?
Question:
I'm having trouble with this configuration because the phone field value remains the same as the source, even though I've tried to anonymize it:
{
"objects": [
{
"operation": "Upsert",
"externalId": "FirstName;LastName;Email",
"mockFields": [
{
"name": "Phone",
"pattern": "phone",
"excludedRegex": "",
"includedRegex": ""
},
{
"name": "Fax",
"pattern": "phone",
"excludedRegex": "*",
"includedRegex": ""
}
],
"query": "SELECT updateable_true FROM Contact"
}
]
}
Why is the phone not modified on the Target?
Answer:
Your anonymization setup appears correct, but you need to enable the mock data update feature by adding "updateWithMockData": true
to your configuration.
Also, it's better to remove the includedRegex
and excludedRegex
properties if they are empty or not needed. Here's the refined configuration:
{
"objects": [
{
"operation": "Upsert",
"externalId": "FirstName;LastName;Email",
"mockFields": [
{
"name": "Phone",
"pattern": "phone"
},
{
"name": "Fax",
"pattern": "phone",
"excludedRegex": "*"
}
],
"query": "SELECT updateable_true FROM Contact",
"updateWithMockData": true
}
]
}