How to modify the include regex option in SFDMU configuration?
Question:
Based on the provided configuration snippet for SFDMU, how can we remove the include regex option for anonymizing data?
{
"objects": [
{
"operation": "Upsert",
"externalId": "FirstName;LastName;Email",
"mockFields": [
{
"name": "Phone",
"pattern": "phone",
"excludedRegex": "",
"includedRegex": ""
},
{
"name": "Fax",
"pattern": "phone",
"excludedRegex": "*"
}
],
"master": false,
"query": "SELECT Id, Name, updateable_true FROM Contact",
"updateWithMockData": true
}
]
}
Answer:
To adjust the configuration for removing the include regex option in SFDMU, you simply omit the includedRegex and excludedRegex fields from the mock fields unless specific filtering is necessary.
Here is the revised export.json configuration that reflects this change:
{
"objects": [
{
"mockFields": [
{
"name": "Phone",
"pattern": "phone"
},
{
"name": "Fax",
"pattern": "phone",
"excludedRegex": "*"
}
],
"query": "SELECT Fax, Id, Phone, updateable_true FROM Contact WHERE Email = 'asong@example.com' LIMIT 1",
"operation": "Upsert",
"updateWithMockData": true,
"externalId": "FirstName;LastName;Email"
}
]
}
Notes:
- In this updated configuration, the
Phonefield will be anonymized, but theFaxwill not due to the presence of theexcludedRegexwildcard, which matches any value. - It's important to ensure that all fields listed in the
mockFieldsarray are explicitly included in the query to be effectively anonymized.