combine data from one folder to another

Hi all :slightly_smiling_face:


I have to combine the data of of the highlighted folders. The data is stored locally. In the above picture this is the path of the data. Is their anyway to do it in KNIME?

Thank you!

Hi @Anoshpananda -

What type of files are you trying to read (csv, xlsx, something else)? I assume they all have the same format. If that’s true then you can use the “Files in folder” mode and associated filter options in one of the appropriate reader nodes (e.g. CSV Reader).

If it’s a non-standard or inconsistent format, then you could use the List Files/Folders node with appropriate filtering applied. Then you can take the generated list of files and loop over them (Table Row To Variable Loop Start) to read them in.

2 Likes

The data in both of these folders “xadio_force_0” is of same format and I am reading it through Simple File Reader. I have to copy data from one xadio_force_0 and combine it with the data of other xadio_force_0. This combined data should be in the same path in one of the folder.

In that case I would try the CSV Reader with the “Files in folder” mode as described above. The Simple File Reader will only deal with a single file. Give it a try and if you have trouble, post here and I can create an example workflow with some dummy files.

1 Like

This xadio_force_0 is a csv file not a folder and I have to combine the data of both of these csv files like concatenate the rows. List file/folders won’t work here. do you have any solution for this?

Try this example workflow. Since the CSV files all have the same format, only a single node is required. The concatenation happens automatically.

Currently the node points at the data folder within the workflow itself, but you can direct it to any folder. You will probably need to click on the “Autodetect format” button once you point the node at your own data.

CSVReaderFilesInFolderExample.knwf (8.6 KB)

4 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.