Insert row with Boolean type using Database Writer


I want to use Database Writer to insert records into a DDBB table which contains a boolean column. When I execute the node I have the following error:

WARN      DatabaseWriterConnection     Error while adding row #1 (175), reason: ERROR: the column «scoring» is boolean type but the expression is Integer

a) The "scoring" column of the input is the type of BooleanCell,

b) In the tab SQL Types (within the Database Writer node) I have set the type "boolean" in the scoring column.

How could I insert rows with boolean column using Database Writer ?

Thanks in advance.




This seems to be a bug, thanks for reporting it. As a workaround, convert the boolean column into an int and then proceed with the database writer.


thanks for your response.

I've tried your workaround proposal with a Java Snippet (simple) and the following code:


int val = $scoring$? 1 : 0;
return val;

just before the Database writer node.

It doesn't works. It gives the same error message. I would appreciate any clue / suggestion.

Thanks in advance.


What exactly is the error you see, please copy the console output. Can you please also check the SQL Types definition in the second tab of the Database Writer dialog.