Meridianmeridian

Currency Amount (EU Format)

finance.currency.amount_eu

Currency amount with European formatting: optional currency symbol (prefix or suffix), period thousands separator, comma decimal separator. Examples: €1.234,56, 1.234,56 €, -€999,99, €0,50

Domain
finance
Category
currency
Casts to
DECIMAL
Scope
Universal

Try it

CLI
$ finetype infer -i "€1.234,56"
→ finance.currency.amount_eu

DuckDB

Detect
SELECT finetype('€1.234,56');
-- → 'finance.currency.amount_eu'
Cast expression
CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[€\$£¥₹₩₿\p{Sc}]', '', 'g'), '\s+', '', 'g'), '\.', '', 'g'), ',', '.') AS DECIMAL(18,2))
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS DECIMAL) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'finance.currency.amount_eu';

Struct Expansion

Expression
numeric_value: CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[€\$£¥₹₩₿\p{Sc}]', '', 'g'), '\s+', '', 'g'), '\.', '', 'g'), ',', '.') AS DECIMAL(18,2))
symbol: REGEXP_EXTRACT({col}, '([€\$£¥₹₩₿\p{Sc}])')

JSON Schema

finetype schema finance.currency.amount_eu
{
  "$id": "https://meridian.online/schemas/finance.currency.amount_eu",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Currency amount with European formatting: optional currency symbol (prefix or suffix), period thousands separator, comma decimal separator. Examples: €1.234,56, 1.234,56 €, -€999,99, €0,50",
  "examples": [
    "€1.234,56",
    "1.234,56 €",
    "-€999,99",
    "€0,50",
    "€42,00",
    "€1.000.000,00",
    "1.250,75 €",
    "€100,00"
  ],
  "pattern": "^[€\\$£¥₹₩₿\\p{Sc}]?\\s?-?\\s?[0-9]{1,3}(\\.[0-9]{3})*(,[0-9]{1,2})?\\s?[€\\$£¥₹₩₿\\p{Sc}]?$|^-?[€\\$£¥₹₩₿\\p{Sc}]?\\s?[0-9]{1,3}(\\.[0-9]{3})*(,[0-9]{1,2})?\\s?[€\\$£¥₹₩₿\\p{Sc}]?$",
  "title": "Currency Amount (EU Format)",
  "type": "string",
  "x-finetype-broad-type": "DECIMAL",
  "x-finetype-transform": "CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[€\\$£¥₹₩₿\\p{Sc}]', '', 'g'), '\\s+', '', 'g'), '\\.', '', 'g'), ',', '.') AS DECIMAL(18,2))"
}

Examples

€1.234,561.234,56 €-€999,99€0,50€42,00€1.000.000,001.250,75 €€100,00

Aliases

currency_amount_eumoney_euprice_eu