I am sure I am not alone when helping on the forum, that I just wish people would be more willing and able to help us help them by uploading sample data in a format that can be quickly applied to a demo workflow. Ideally, if nothing else, sample data would be uploaded as a spreadsheet, or self-contained within an uploaded workflow. There are fewer barriers to being helpful than having to make up our own sample data when all we want to do is quickly assist with a solution.
I don’t think this perfect world will ever happen though, and so often the best we can hope is that the user writes their sample data as text into their plea for help.
It will be presented something like this:
Name|Age|City
Alan|25|London
Brian|23|New York
Charlie|30|Auckland
or
PartNo,Description,Price
X22,Widget,2.00
F984,Dumbit,5.00
G871,Wotsit,1.50
H26,Nuverfing,3.00
And all the “Regulars” on the KNIME Community Forum share a collective sigh because we know we either have to translate this into Excel and then save it somewhere, or (worse?) paste it into a Table Creator, and then hand-crank the column names and … you get the picture.
Wouldn’t it be nice if Table Creator (or something similar) allowed us to paste into it, specifying that the first row was the column headings, and that the pasted columns were delimited with “(whatever)”.
So… I felt a need for a component and this is what I came up with, the succinctly named
“Extract Data Table from Delimited Text
” component
Drop it onto a new workflow and configure by pasting in the supplied “table text”, and set the delimiter. It will automatically attempt to infer the column types using Column Auto Type Cast
becomes:
becomes:
You might still have to do a little playing with the data if the odd delimiter has been missed by the posting user, but hopefully it will save a lot of time and effort in a good many cases.