numeric
Numbers written as text: whole numbers, decimals with a point or a comma, percentages, scientific notation, and figures with a magnitude suffix such as K or M. A point can be the decimal separator or, where a comma is the decimal separator, the thousands separator, so a string such as 1.234 can mean different numbers.
6 numeric types: 3 a sibling also accepts, 2 of which it would misread, 4 that decompose into parts, 2 in Meridian's open data.
The 6 numeric types
Each type's first registry sample, against every sibling's rule
| Type | Sample | Also accepted by |
|---|---|---|
Integer Number integer_number · BIGINT | 42 | decimal_number → 42.0; decimal_number_comma → 42.0; percentage → 0.42 |
Decimal Number decimal_number · DOUBLE | 3.14 | percentage → 0.0314 |
Scientific Notation scientific_notation · DOUBLE | 1.23e-4 | decimal_number |
Decimal Number (Comma Separator) decimal_number_comma · DOUBLE | 1.234,56 | — |
Percentage percentage · DOUBLE | 50% | — |
SI-Prefix Number si_number · DOUBLE | 12.2K | — |
Which numeric type is it?
4 of 6 numeric types accept it, and read it 3 ways.
| Type | Reads it as |
|---|---|
Integer Number integer_number | 42 |
Decimal Number decimal_number | 42.0 |
Decimal Number (Comma Separator) decimal_number_comma | 42.0 |
Percentage percentage | 0.42 |
In Meridian's datasets
- Decimal Numberedgar_gleif
.confidence - Integer Numberedgar_gleif
.keyhts.depthhts.indentschedule_b.depthhcpcs.depthndc.depthndc.listing_count
Use it
Shell
printf '%s\n' '42' '-17' > column.txt
finetype infer -f column.txt --mode columnDuckDB
SELECT ft_profile(v) FROM (VALUES ('42'), ('-17')) t(v);After -17, 4 types remain: decimal_number, decimal_number_comma, integer_number, percentage.