Comma-Separated Values (Simple)
Type Registry
Comma-Separated Values (Simple)
container.array.comma_separated Simple list of comma-separated values (not JSON array, plain CSV). Example: "apple,banana,cherry" RECURSIVE INFERENCE: Samples elements and infers common type, returns LIST<inferred_type>. If all elements parse as integers, returns LIST<BIGINT>. If mixed types, returns LIST<VARCHAR>.
Domain container›array
Casts to VARCHAR
Scope Universal
Try it
CLI
$ finetype infer -i "apple,banana,cherry"
→ container.array.comma_separated DuckDB
Detect
SELECT finetype('apple,banana,cherry');
-- → 'container.array.comma_separated' Cast expression
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) = 'container.array.comma_separated'; Decompose
STRING_SPLIT({col}, ',') JSON Schema
finetype schema container.array.comma_separated {
"$id": "https://noon.sh/schemas/container.array.comma_separated",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Simple list of comma-separated values (not JSON array, plain CSV). Example: \"apple,banana,cherry\"\nRECURSIVE INFERENCE: Samples elements and infers common type, returns LIST<inferred_type>. If all elements parse as integers, returns LIST<BIGINT>. If mixed types, returns LIST<VARCHAR>.",
"examples": [
"apple,banana,cherry",
"1,2,3,4,5",
"red,green,blue"
],
"pattern": "^[^,]+(,[^,]+)*$",
"title": "Comma-Separated Values (Simple)",
"type": "string"
} Examples
apple,banana,cherry1,2,3,4,5red,green,blue Also known as
csv_simplecomma_list