How to ...?

Hi there, I'm just beginning with Knime to do some CSV extraction, mysql joining etc. but there is some things I don't conceptually know how to do.

exemple : 
 - I have a CSV file with a column "USERS", containing 3 rows: UserA, UserrB, UserC
 - I have an SQL database containing a table USERS with all users name.

Basically, I want to check if my 3 users described in the CSV are existing in the DB (in this exemple it won't be the case because of a mistyped 'UserrB')

I started like this :
 1) CSV Reader + Column Filter (to keep only the USER column) + GroupBY (to keep single values)
 2) Database Reader (which select all the users from the USER table)

then, I whish a way to "compare" or maybe "check" if the results of 1 are also in the results 2. However the method, a simple "red sign" of the node will be OK for that since the project should check the structure and the content of a CSV file.

I hope to be clear enough !


Hi Brice,

It looks like you have made a good start! : )

There are lots of ways of achieving what (I think) you want to do...  If I understand correctly, then you would probably like your csv table to be supplemented by a 'valid' column, where each row has either a 'true' or 'false' entry, depending on whether the user is found in the DB(?)

You could use the Set Operator node, or the Joiner node to compare one list with the other; and you could probably make use of the Rule Engine node...   But the attached shows an example using Reference Row Filter nodes for the comparison, and the Java Snippet node for the annotating.

Hope this helps!




Hi James, indeed I used the reference row filter.

Thanks !