I have probably quite a simple problem: I want to process a raw txt file with Knime into a data table so I can do some statistics with it. I have tried using the 'Flat File Document Parser' and the Line Reader but I don't get to the point where I get one column for each data set. An example for my text file looks like:
07.06.2013 CHERRY TABLE BLUE 17:30 00:15#253,000 00:30#253,000 00:45#253,000
08.06.2013 CHERRY CHAIR BLUE 23:58 00:15#254,000 00:30#254,000 00:45#254,000 [...]
And I want this text file to look like a table, so I can do some statistics later.
Sorry, I was probably too unclear with my description. My text file does not have any delimiters! What I want to do, is to process this text file in a way that I get tabular data. In other words, to transform this text file into value delimited data.
To explain a bit more: This text files contains repetitive elements:
Date
Furniture
Color
Time
followed by some Data
Is there any way I can process this text file, so that I get a table?
Wow! Your example works perfectly -- it is exactly what I was trying to do. Thank you very much. I have never used the 'Chunk Loop' node before. It seems to work great for my purpose.
This also helps me to understand Knime better. Thanks, Sam!
Ok, I've put together a crude example of a way to do this.
It is dependant on you having a constant number of results though. In this example 8 data row and a blank row (the blank row can be missing at the end of the file though.
You will need to change the red sections to the values in your actual data (96 time rows plus the 5 data rows at the start)
I know that This message was posted on 2013 and now we are in 2016 but I think that my problem is quite similar to this one : I want also to process a raw txt file with Knime into a data table, the difference in my problem is that I don't have a constant number to split, as follow:
Interesting post - I have a similar problem combining a number of text files (that differ in terms of number of columns) and appending them together. Are you able to share a screenshot of you node’s sequence for ‘aloe’ project - I am not able to see it properly/open it.
@Pawel40Adi maybe it would be best to open a new forum entry and describe what you want to do and maybe give us some (dummy) sampel data that would represent your problem. In the meantime you could explore this older collection regarding the import of CSV/TXT files:
Also you might want to check if just allowing the dynamic change of file structure in the CSV Reader might solve your problem: