Meridianmeridian

Postal Code

geography.address.postal_code

Postal code or ZIP code for mail delivery. Format varies by country: US ZIP codes (5 digits or ZIP+4), UK postcodes (alphanumeric), etc. Locale-specific format.

Domain
geography
Category
address
Casts to
VARCHAR
Scope
Locale-specific
Locales
EN, EN_AU, EN_GB, EN_CA, EN_US, EN_IE, EN_NZ, EN_SG, EN_PH, EN_NG, EN_KE, DE, DE_AT, DE_CH, FR, ES, ES_MX, ES_AR, ES_CL, ES_CO, ES_PE, IT, NL, NL_BE, PL, PT, PT_BR, RU, UA, JA, ZH, ZH_TW, KO, SV, NB, DA, FI, IS, TR, HE, EL, AR_SA, AR_EG, AR_MA, ZA, NG, HI, UR, BN, TH, MS, ID, VI, CS, HU, RO, BG, HR, SK, SL, LT, LV, ET, SR, LU, MT

Try it

CLI
$ finetype infer -i "10001"
→ geography.address.postal_code

DuckDB

Detect
SELECT finetype('10001');
-- → 'geography.address.postal_code'
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) = 'geography.address.postal_code';

Struct Expansion

Expression
first_part: REGEXP_EXTRACT({col}, '^([0-9A-Z]+)')

JSON Schema

finetype schema geography.address.postal_code
{
  "$id": "https://meridian.online/schemas/geography.address.postal_code",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Postal code or ZIP code for mail delivery. Format varies by country: US ZIP codes (5 digits or ZIP+4), UK postcodes (alphanumeric), etc. Locale-specific format.",
  "examples": [
    "10001",
    "75004",
    "W1C 1AX",
    "EC1A 1BB"
  ],
  "maxLength": 10,
  "minLength": 3,
  "title": "Postal Code",
  "type": "string",
  "x-finetype-broad-type": "VARCHAR",
  "x-finetype-transform": "CAST({col} AS VARCHAR)"
}

Examples

1000175004W1C 1AXEC1A 1BB

Aliases

zip_codepostcode