Country Code
ISO 3166-1 alpha-2 country code (2 letters, e.g., US, FR, JP). Universal format.
Country Code
geography.location.country_codeISO 3166-1 alpha-2 country code (2 letters, e.g., US, FR, JP). Universal format.
Domain
geography
Category
location
Casts to
VARCHAR
Scope
Universal
Try it
CLI
$ finetype infer -i "US"
→ geography.location.country_codeDuckDB
Detect
SELECT finetype('US');
-- → 'geography.location.country_code'Cast expression
UPPER(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.location.country_code';JSON Schema
finetype schema geography.location.country_code
{
"$id": "https://meridian.online/schemas/geography.location.country_code",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "ISO 3166-1 alpha-2 country code (2 letters, e.g., US, FR, JP). Universal format.",
"examples": [
"US",
"FR",
"JP",
"DE",
"CA"
],
"pattern": "^[A-Z]{2}$",
"title": "Country Code",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "UPPER(CAST({col} AS VARCHAR))"
}Examples
USFRJPDECAAliases
iso_3166_1_alpha_2