Categorical Value
Discrete string value from a small, unordered set (e.g., "male"/"female", "S"/"C"/"Q", "red"/"blue"/"green", "active"/"inactive"). Typical cardinality: 2-20 unique values. Transforms to ENUM when cardinality is below --enum-threshold (default 50), otherwise VARCHAR. Column-level identification relies on low cardinality detection.
Categorical Value
representation.discrete.categoricalDiscrete string value from a small, unordered set (e.g., "male"/"female", "S"/"C"/"Q", "red"/"blue"/"green", "active"/"inactive"). Typical cardinality: 2-20 unique values. Transforms to ENUM when cardinality is below --enum-threshold (default 50), otherwise VARCHAR. Column-level identification relies on low cardinality detection.
Domain
representation
Category
discrete
Casts to
ENUM
Scope
Universal
Try it
CLI
$ finetype infer -i "active"
→ representation.discrete.categoricalDuckDB
Detect
SELECT finetype('active');
-- → 'representation.discrete.categorical'Cast expression
CAST({col} AS VARCHAR)Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS ENUM) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'representation.discrete.categorical';JSON Schema
finetype schema representation.discrete.categorical
{
"$id": "https://meridian.online/schemas/representation.discrete.categorical",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Discrete string value from a small, unordered set (e.g., \"male\"/\"female\", \"S\"/\"C\"/\"Q\", \"red\"/\"blue\"/\"green\", \"active\"/\"inactive\"). Typical cardinality: 2-20 unique values. Transforms to ENUM when cardinality is below --enum-threshold (default 50), otherwise VARCHAR. Column-level identification relies on low cardinality detection.",
"examples": [
"active",
"male",
"S",
"red",
"pending",
"Type A"
],
"maxLength": 50,
"minLength": 1,
"title": "Categorical Value",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "CAST({col} AS VARCHAR)"
}Examples
activemaleSredpendingType AAliases
categoryenumfactorlevel