US Social Security Number
9-digit identifier assigned to US citizens and residents for tax and social security purposes. Format: AAA-GG-SSSS where area number cannot be 000, 666, or 900-999.
US Social Security Number
identity.government.ssn9-digit identifier assigned to US citizens and residents for tax and social security purposes. Format: AAA-GG-SSSS where area number cannot be 000, 666, or 900-999.
Domain
identity
Category
government
Casts to
VARCHAR
Scope
Locale-specific
Locales
EN_US
Try it
CLI
$ finetype infer -i "078-05-1120"
→ identity.government.ssnDuckDB
Detect
SELECT finetype('078-05-1120');
-- → 'identity.government.ssn'Cast expression
CAST({col} AS VARCHAR)Safe cast pipeline
-- 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.government.ssn';Struct Expansion
Expression
area: REGEXP_EXTRACT({col}, '^(\d{3})')
group: REGEXP_EXTRACT({col}, '-(\d{2})-')
serial: REGEXP_EXTRACT({col}, '(\d{4})$')JSON Schema
finetype schema identity.government.ssn
{
"$id": "https://meridian.online/schemas/identity.government.ssn",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "9-digit identifier assigned to US citizens and residents for tax and social security purposes. Format: AAA-GG-SSSS where area number cannot be 000, 666, or 900-999.",
"examples": [
"078-05-1120",
"219-09-9999",
"123-45-6789",
"531-02-7834"
],
"maxLength": 11,
"minLength": 11,
"pattern": "^(?!000|666|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0000)\\d{4}$",
"title": "US Social Security Number",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-pii": true,
"x-finetype-transform": "CAST({col} AS VARCHAR)"
}Examples
078-05-1120219-09-9999123-45-6789531-02-7834Aliases
social_security_number