geography.location.country_codeISO 3166-1 alpha-2 country code (2 letters, e.g., US, FR, JP). Universal format.
$ finetype infer -i "US"
→ geography.location.country_codeSELECT finetype('US');
-- → 'geography.location.country_code'UPPER(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) = '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))"
}USFRJPDECA