MeridianMERIDIAN

schema

Export the JSON Schema for a semantic type — validation rules, examples, and DuckDB cast expressions.

Export the JSON Schema for any FineType type. Each schema includes a regex pattern, length constraints, examples, and the DuckDB expression needed to cast matching values.

Usage

finetype schema [OPTIONS] <TYPE_KEY>

Arguments

ArgumentDescription
TYPE_KEYType key (e.g., identity.person.email) or glob pattern (e.g., identity.person.*)

Options

FlagTypeDefaultDescription
-f, --filepathlabelsTaxonomy file or directory
--prettyflagPretty-print JSON output

Examples

Export a single type schema

$ finetype schema identity.person.email --pretty
{
  "$id": "https://meridian.online/schemas/identity.person.email",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Email Address",
  "description": "Standard email address (RFC 5322 simplified)...",
  "type": "string",
  "pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9]...",
  "minLength": 5,
  "maxLength": 254,
  "examples": ["[email protected]", "[email protected]"],
  "x-finetype-broad-type": "VARCHAR",
  "x-finetype-pii": true,
  "x-finetype-transform": "LOWER(CAST({col} AS VARCHAR))"
}

Export all types in a category

Use a glob pattern to export every type within a category:

$ finetype schema "identity.person.*" --pretty

This outputs a JSON array of schemas for all types under identity.person — email, full name, username, and others.

Pipe to jq for specific fields

$ finetype schema identity.person.email | jq '.pattern'

Schema fields

Every exported schema follows JSON Schema 2020-12 and includes FineType extensions:

FieldDescription
$idPermanent URL on meridian.online
titleHuman-readable type name
descriptionWhat the type represents
patternRegex that matching values conform to
examplesSample values for testing
x-finetype-broad-typeDuckDB target type (VARCHAR, BIGINT, TIMESTAMP, etc.)
x-finetype-piiWhether the type may contain personally identifiable information
x-finetype-transformDuckDB SQL expression for safe casting ({col} is the column placeholder)

See also

  • validate — validate data against these schemas
  • taxonomy — browse the full type hierarchy
  • Type Registry — browse all types with schemas on the web

On this page