Icon

06_​Writing_​a_​data_​table_​column_​wise_​to_​multiple_​csv_​files

Writing a data table column wise to multiple csv files

This workflow shows a solution of how to write a data table column wise to multiple csv files. Each column should be written to one separate csv file. This is a solution the a question asked in the KNIME forum:

Writing a data table column wise to multiple csv files The flow shown here is a solution to a question asked in the KNIME forum: http://tech.knime.org/forum/knime-general/simple-loop-on-columnsI have a csv file with n columns and would like to execute a loop over the columns.For i, from 1 to n-1 : write a csv file named *i.csv with one column = Colum i + Column nI didn't find anything with Loop Support.Note, you can change the number of columns in the Data Generator (field "Universe Size").If you run the workflow, make sure you reset all of the nodes before (incl. the Temp Dir Creator)! The column filter & ref col filter ensure all but the lastcolumn are fed into the column list loop start - they willalso work if the set of input columns change! Only the name of the last column must not change! random dataempty input, just close loopignored contentoutput dirlast columnall but lastcurrent + lastOver all but lastdetermine out file name Data Generator Loop End Table Creator CSV Writer Create Temp Dir Column Filter ReferenceColumn Filter Joiner Column ListLoop Start Create File Name Writing a data table column wise to multiple csv files The flow shown here is a solution to a question asked in the KNIME forum: http://tech.knime.org/forum/knime-general/simple-loop-on-columnsI have a csv file with n columns and would like to execute a loop over the columns.For i, from 1 to n-1 : write a csv file named *i.csv with one column = Colum i + Column nI didn't find anything with Loop Support.Note, you can change the number of columns in the Data Generator (field "Universe Size").If you run the workflow, make sure you reset all of the nodes before (incl. the Temp Dir Creator)! The column filter & ref col filter ensure all but the lastcolumn are fed into the column list loop start - they willalso work if the set of input columns change! Only the name of the last column must not change! random dataempty input, just close loopignored contentoutput dirlast columnall but lastcurrent + lastOver all but lastdetermine out file name Data Generator Loop End Table Creator CSV Writer Create Temp Dir Column Filter ReferenceColumn Filter Joiner Column ListLoop Start Create File Name

Nodes

Extensions

Links