identity.commerce.isbnInternational Standard Book Number. ISBN-10 (10 digits with check digit) or ISBN-13 (13 digits with check digit). Also accepts with hyphens.
$ finetype infer -i "978-0-13-110362-7"
→ identity.commerce.isbnSELECT finetype('978-0-13-110362-7');
-- → 'identity.commerce.isbn'CAST({col} AS VARCHAR)-- 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) = 'identity.commerce.isbn';isbn_version: CASE WHEN LENGTH(REGEXP_REPLACE({col}, '-', '')) = 10 THEN 'ISBN-10' ELSE 'ISBN-13' END{
"$id": "https://meridian.online/schemas/identity.commerce.isbn",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "International Standard Book Number. ISBN-10 (10 digits with check digit) or ISBN-13 (13 digits with check digit). Also accepts with hyphens.",
"examples": [
"978-0-13-110362-7",
"0-13-110362-9",
"9780131103627"
],
"pattern": "^(?: 97[89]-)?[0-9]{1,5}-[0-9]+-[0-9]+-[0-9X]$|^[0-9]{9}[0-9X]$|^[0-9]{13}$",
"title": "ISBN",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "CAST({col} AS VARCHAR)"
}978-0-13-110362-70-13-110362-99780131103627