Concatenate sdf files

This workflow does not work if the IDNumber is a number (integer)  and not a string.

ERROR SDF Reader           2:151      Execute failed: ("ClassCastException"): null .

It works perfectly if the IDNumber is a string.

I add two SDF which create the problem.

Sorry, but I don't understand your problem. The workflow doesn't work due to missing input files and the two SDF files don't contain an "IDNumber" property.

I suspect you're issue is because in one SDF (not those attached) you have a column with an ID as a String. This is then controlling the configure of the loop end. Later, you read in an SDF where the column type is an Integer which isn't expected at the loop end. 

You could try forcing the column to be a String before the loop end. 

 

As Thor says, you're example files don't show this issue. 

Thanks to both of you. The Catalog Number (IDNumber) looks always like an Integer, but in two files it was defined as String. I will add a node to unify the type of fields.

Issue solved.

I ticked in LOOP END "Allow variable column types". But this does not solve the problem.

Ah, the error is in the SDF reader not the loop end. It has been configured expecting one SDF Tag format and is getting another later in the loop. 

 

Try instead reading in the SDF block, no tags, then extracting that tags using the SDF exract node (or something along those lines)

This might be crude, but can't you simply use a filesystem command to concatenate the data before reading it into knime?

In bash i would use

cat somefolder/*.sdf > everything.sdf

 

1 Like