Icon

kn_​forum_​2734_​aloe_​import_​txt_​file

aloe - import complex TXT file
Read in using the line reader. And thechunk loop should be set to thenumber of rows per element (includingthe blank line that seperates the blocks) Remove the blank line andreset the ID We create a dictionary of headers forthe first 5 elements (date, fruit,furniture, color and time) Here we make the column header for the time elements. Then resetthe time value to be the component after the # Join the time data back in, set the column headers to bethe row ID then transpose Collect all the results. Original workflow by swebbhttps://forum.knime.com/t/converting-a-raw-text-file-into-a-data-table/2734/9?u=mlauber71Read fileknime://knime.workflow/data/exampletext.txtnumber ofrows perentryremove 9th elementcolumn headerdictionaryNode 7resetseperate on#replacevaluekeepfirst 5columnsjoin backrename toheaderremoveunwantedset columnto be the headertransposecollect results Line Reader(deprecated) Chunk Loop Start Row Filter Table Creator RowID RowID Joiner (deprecated) Cell Splitter(deprecated) String Manipulation Row Splitter Concatenate Column Rename Column Filter RowID Transpose Loop End(deprecated) Read in using the line reader. And thechunk loop should be set to thenumber of rows per element (includingthe blank line that seperates the blocks) Remove the blank line andreset the ID We create a dictionary of headers forthe first 5 elements (date, fruit,furniture, color and time) Here we make the column header for the time elements. Then resetthe time value to be the component after the # Join the time data back in, set the column headers to bethe row ID then transpose Collect all the results. Original workflow by swebbhttps://forum.knime.com/t/converting-a-raw-text-file-into-a-data-table/2734/9?u=mlauber71Read fileknime://knime.workflow/data/exampletext.txtnumber ofrows perentryremove 9th elementcolumn headerdictionaryNode 7resetseperate on#replacevaluekeepfirst 5columnsjoin backrename toheaderremoveunwantedset columnto be the headertransposecollect results Line Reader(deprecated) Chunk Loop Start Row Filter Table Creator RowID RowID Joiner (deprecated) Cell Splitter(deprecated) String Manipulation Row Splitter Concatenate Column Rename Column Filter RowID Transpose Loop End(deprecated)

Nodes

Extensions

Links