Height
Person height in cm, inches, or feet.inches format (e.g., 180cm, 5'10", 180). Transforms to DOUBLE (centimeters). Decompose extracts value and unit.
Height
identity.person.heightPerson height in cm, inches, or feet.inches format (e.g., 180cm, 5'10", 180). Transforms to DOUBLE (centimeters). Decompose extracts value and unit.
Domain
identity
Category
person
Casts to
DOUBLE
Scope
Universal
Try it
CLI
$ finetype infer -i "180 cm" --mode column
→ identity.person.heightDuckDB
Detect
SELECT ft_infer('180 cm');
-- → 'identity.person.height'Cast expression
CASE
WHEN UPPER({col}) LIKE '%FT%' OR {col} LIKE '%''%' THEN
(CAST(REGEXP_EXTRACT({col}, '^([0-9]+)') AS DOUBLE) * 30.48) +
(CAST(COALESCE(NULLIF(REGEXP_EXTRACT({col}, '''([0-9]+)', 1), ''), '0') AS DOUBLE) * 2.54)
WHEN UPPER({col}) LIKE '%IN%' THEN CAST(REGEXP_EXTRACT({col}, '^([0-9.]+)') AS DOUBLE) * 2.54
ELSE CAST(REGEXP_EXTRACT({col}, '^([0-9.]+)') AS DOUBLE)
END
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(ft_cast(my_column) AS DOUBLE) AS clean_value
FROM my_table
WHERE ft_infer(my_column) = 'identity.person.height';Struct Expansion
Expression
unit: UPPER(COALESCE(REGEXP_EXTRACT({col}, '([A-Z]+)$'), CASE WHEN LENGTH({col}) > 10 THEN 'CM' ELSE 'INCH' END))
value: CAST(REGEXP_EXTRACT({col}, '^([0-9.]+)') AS DOUBLE)JSON Schema
finetype taxonomy identity.person.height -o json-schema
{
"$id": "https://meridian.online/schemas/identity.person.height",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Person height in cm, inches, or feet.inches format (e.g., 180cm, 5'10\", 180). Transforms to DOUBLE (centimeters). Decompose extracts value and unit.",
"examples": [
"180 cm",
"5'10\"",
"70 inches",
"6 ft"
],
"pattern": "^[0-9]+(\\.[0-9]+)?\\s*(cm|in|ft|inches|feet)?$|^[0-9]+'[0-9]+\"$",
"title": "Height",
"type": "string",
"x-finetype-label": "identity.person.height",
"x-finetype-pii": false
}Examples
180 cm5'10"70 inches6 ft