datetime.component.yearFour-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.
$ finetype infer -i "2024"
→ datetime.component.yearSELECT finetype('2024');
-- → 'datetime.component.year'{col}::SMALLINT-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS SMALLINT) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.component.year';{
"$id": "https://meridian.online/schemas/datetime.component.year",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Four-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.",
"examples": [
"2024",
"1999",
"2000"
],
"pattern": "^\\d{4}$",
"title": "Calendar Year",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "{col}::SMALLINT"
}202419992000