file
4 file types: 3 a sibling also accepts, 1 of which it would misread, 3 that decompose into parts.
The 4 file types
Each type's first registry sample, against every sibling's rule
| Type | Sample | Also accepted by |
|---|---|---|
File Size file_size · BIGINT | 1024 | excel_format → 1024; extension → 1024 |
File Extension extension · VARCHAR | txt | excel_format |
MIME Type mime_type · VARCHAR | text/plain | excel_format |
Excel Number Format String excel_format · VARCHAR | #,##0.00 | — |
Which file type is it?
3 of 4 file types accept it, and read it 2 ways.
| Type | Reads it as |
|---|---|
File Size file_size | 1024.0 |
Excel Number Format String excel_format | 1024 |
File Extension extension | 1024 |
Use it
CLI · DuckDB
$ printf '%s\n' '1024' '1.5 MB' > column.txt
$ finetype infer -f column.txt --mode column
SELECT ft_profile(v) FROM (VALUES ('1024'), ('1.5 MB')) t(v);After 1.5 MB, 2 types remain: excel_format, file_size.