finance.currency.amount_code_prefixISO 4217 three-letter currency code as prefix, followed by amount. Standard in SWIFT messages, banking/FX systems, and international financial data. Separator conventions vary by currency.
$ finetype infer -i "USD 1,234.56"
→ finance.currency.amount_code_prefixSELECT finetype('USD 1,234.56');
-- → 'finance.currency.amount_code_prefix'CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '^[A-Z]{3}\s?', ''), ',', '') AS DECIMAL(18,2))-- 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) = 'finance.currency.amount_code_prefix';currency_code: REGEXP_EXTRACT({col}, '^([A-Z]{3})')
numeric_value: CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '^[A-Z]{3}\s?', ''), ',', '') AS DECIMAL(18,2)){
"$id": "https://meridian.online/schemas/finance.currency.amount_code_prefix",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "ISO 4217 three-letter currency code as prefix, followed by amount. Standard in SWIFT messages, banking/FX systems, and international financial data. Separator conventions vary by currency.",
"examples": [
"USD 1,234.56",
"EUR 1.234,56",
"GBP 999.99",
"JPY 10,000"
],
"pattern": "^[A-Z]{3}\\s?-?[0-9]{1,3}([,.]?[0-9]{3})*(\\.[0-9]{1,2})?$",
"title": "Currency Amount (ISO Code Prefix)",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "CAST(REGEXP_REPLACE(REGEXP_REPLACE({col}, '^[A-Z]{3}\\s?', ''), ',', '') AS DECIMAL(18,2))"
}USD 1,234.56EUR 1.234,56GBP 999.99JPY 10,000