EAN
Type Registry
EAN
technology.code.ean European Article Number (also called Universal Product Code / UPC). Standard versions: EAN-8 (8 digits) and EAN-13 (13 digits). Last digit is check digit.
Domain technology›code
Casts to VARCHAR
Scope Universal
Try it
CLI
$ finetype infer -i "5901234123457"
→ technology.code.ean DuckDB
Detect
SELECT finetype('5901234123457');
-- → 'technology.code.ean' 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) = 'technology.code.ean'; Struct Expansion
ean_version: CASE WHEN LENGTH({col}) = 8 THEN 'EAN-8' WHEN LENGTH({col}) = 13 THEN 'EAN-13' ELSE 'UNKNOWN' END JSON Schema
finetype schema technology.code.ean {
"$id": "https://noon.sh/schemas/technology.code.ean",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "European Article Number (also called Universal Product Code / UPC). Standard versions: EAN-8 (8 digits) and EAN-13 (13 digits). Last digit is check digit.",
"examples": [
"5901234123457",
"96385074",
"4006381333931"
],
"pattern": "^[0-9]{8}$|^[0-9]{13}$",
"title": "EAN",
"type": "string"
} Examples
5901234123457963850744006381333931 Also known as
upc