Multiple csv files reading failed for double type number

Hello,

I am a beginner for KNIME. I met a problem in reading multiple csv files and merge them into one big csv file.

The following is what I used. A loop to import all csv files under folder
image

Sorry, I click wrong and upload the question before finish it.

I got the error when I run the workflow,

From the configuration of File Reader, I can see it was recognized as a double number

Any tips to solve this problem will be very appreciated.

Thanks and regards
Mei

Hi @Meihong

Welcome to the KNIME Forum community!

Does this error happen right away when reading the first file, does it happen when reading another file, or does it happen in de Loop End node?

When not all files have an identical set of columns the Loop End will stop on a situation like this if you use the default configuration.

The default configuration of the Loop End node looks like this:
afbeelding

When you have changing inputfiles, you could tick the last two tickmarks to read all of them into one combined result.

3 Likes

Hi JanDou,

Thank you JanDuo
This error happened after running for a while when reading one group of data files which after you mentioned I noticed that their structure is different with other groups data (the order of two columns data are switched).

The reading problem could be solved by click last two tick marks in Loop End as you suggested, but I think it would be better that the data structure be changed to the same before read and merge those csv files.

Thanks again for your great help!

1 Like

@Meihong,

with 4.2 you can read multiple (CSV) files without the need of a loop.

How?

  1. Use the CSV Reader (Labs) node https://kni.me/n/kquSunBXI2Vo6TJy.
  2. Open the dialog and select Files in Folder
  3. Select the folder containing the files you want to read via the browse button
  4. if your want to filter for certain files make use of the filter option
  5. Adapt the other settings to your needs

The preview should show the final structure of the table. In case the files structure is changing go to the advanced settings tab and adapt the Spec merge mode to Union

If you’re running into any trouble please let me know.

Best
Mark

4 Likes

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