mimir icon indicating copy to clipboard operation
mimir copied to clipboard

Fixed-width-format data inputs

Open okennedy opened this issue 5 years ago • 2 comments

okennedy avatar Jul 18 '19 23:07 okennedy

Some files use a fixed-width format.

foo    1    2019-01-02
barbaz 231  2019-12-01

It would be handy to be able to parse these in. As part of the configuration, you'd need column widths. For example:

LOAD DATASET bla AS FIXED(name = 7, amount = 6, year = 4, skip(1), month = 2, skip(1), day = 2)

or using regexp

LOAD DATASET bla AS REGEXP("(.{6}) (.{5}) ([0-9]{4})-([0-9]{2})-([0-9]{2})", SCHEMA(name, amount,  year, month, day))

okennedy avatar Jul 30 '19 20:07 okennedy

#70 or something like it might be a better thing to do here.

okennedy avatar Jul 31 '19 19:07 okennedy