MIME Type
MIME type (media type) for files and HTTP content (e.g., text/plain, application/json, image/png).
MIME Type
representation.file.mime_typeMIME type (media type) for files and HTTP content (e.g., text/plain, application/json, image/png).
Domain
representation
Category
file
Casts to
VARCHAR
Scope
broad_characters
Try it
CLI
$ finetype infer -i "text/plain"
→ representation.file.mime_typeDuckDB
Detect
SELECT finetype('text/plain');
-- → 'representation.file.mime_type'Cast expression
LOWER(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) = 'representation.file.mime_type';Struct Expansion
Expression
charset: REGEXP_EXTRACT({col}, 'charset=([^;]+)')
subtype: REGEXP_EXTRACT({col}, '/([^;]+)')
type: REGEXP_EXTRACT({col}, '^([^/]+)')JSON Schema
finetype schema representation.file.mime_type
{
"$id": "https://meridian.online/schemas/representation.file.mime_type",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "MIME type (media type) for files and HTTP content (e.g., text/plain, application/json, image/png).",
"examples": [
"text/plain",
"application/json",
"image/png",
"text/html; charset=utf-8",
"application/vnd.ms-excel"
],
"pattern": "^[a-zA-Z]+/[a-zA-Z0-9.+\\-]+(;.*)?$",
"title": "MIME Type",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "LOWER(CAST({col} AS VARCHAR))"
}Examples
text/plainapplication/jsonimage/pngtext/html; charset=utf-8application/vnd.ms-excelAliases
content_typemedia_type