identity.person.phone_numberTelephone number in various formats. Locale-specific due to digit grouping, area code positions, and formatting conventions (e.g., US +1 (xxx) xxx-xxxx vs EU +xx-xxx-xxx-xxxx). May include country code, area code, and extension.
$ finetype infer -i "+1 (555) 123-4567"
→ identity.person.phone_numberSELECT finetype('+1 (555) 123-4567');
-- → 'identity.person.phone_number'CAST({col} AS VARCHAR)-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'identity.person.phone_number';area_code: REGEXP_EXTRACT({col}, '[^0-9]([0-9]{3})[^0-9]')
country_code: REGEXP_EXTRACT({col}, '^\+?([0-9]{1,3})')
digits_only: REGEXP_REPLACE({col}, '[^0-9]', ''){
"$id": "https://meridian.online/schemas/identity.person.phone_number",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Telephone number in various formats. Locale-specific due to digit grouping, area code positions, and formatting conventions (e.g., US +1 (xxx) xxx-xxxx vs EU +xx-xxx-xxx-xxxx). May include country code, area code, and extension.",
"examples": [
"+1 (555) 123-4567",
"555-123-4567",
"+44 20 7946 0958",
"+33 1 42 68 53 00",
"07911 123456"
],
"maxLength": 30,
"minLength": 7,
"pattern": "^[+]?[0-9\\s()\\-\\./\\u2013]+([\\s]*(ext\\.?|Ext\\.?|x|#)[\\s]*\\d{1,5})?([\\s]*(Work|Cell|Fax|Home|Office))?$",
"title": "Phone Number",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "CAST({col} AS VARCHAR)"
}+1 (555) 123-4567555-123-4567+44 20 7946 0958+33 1 42 68 53 0007911 123456