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.

{
  "schema": "string",
  "table": "string",
  "column": "string",
  "dataType": "string",  //MongoDB only
  "metadata": {
    "presetId": "string",
    "generatorId": "USPhoneNumberGenerator",
    "replaceInvalidNumbers": boolean,
    "isConsistent": boolean,
    "encryptionProcessor": "x-on", //To use configured Structural 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": [
    {
      "schema": "public",
      "table": "users",
      "column": "cell-phone",
      "metadata": {
        "presetId": "USPhoneNumberGenerator",
        "generatorId": "USPhoneNumberGenerator",
        "replaceInvalidNumbers": true,
        "isConsistent": false
      }
    }
  ]
}

Last updated