Search
K
Links

Phone (USPhoneNumberGenerator)

The Phone generator generates a random telephone number that matches the country or region of the input telephone number while maintaining the format.
The Phone generator does not support linking. It can be made self-consistent, but not consistent with another column. You cannot configure differential privacy.
The metadata object is populated from the PhoneNumberMetadata object, which includes a setting to indicate whether to replace invalid telephone numbers with valid telephone numbers.
{
"presetId": "string",
"generatorId": "USPhoneNumberGenerator",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string", //MongoDB only
"metadata": {
"replaceInvalidNumbers": boolean,
"isConsistent": boolean
},
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied
}

Example replacement

In the following replacement for the Phone generator, invalid phone numbers are replaced. Consistency is disabled.
{
"name": "cell_phone",
"schema": "public",
"table": "users",
"links": [
{
"presetId": "USPhoneNumberGenerator",
"generatorId": "USPhoneNumberGenerator",
"schema": "public",
"table": "users",
"column": "cell-phone",
"metadata": {
"replaceInvalidNumbers": true,
"isConsistent": false
}
}
]
}