omora
August 10, 2012, 12:39pm
1
Hi,
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.
Oscar
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.
omora
September 3, 2012, 10:42am
3
Gabriel,
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.
gabriel
September 3, 2012, 6:15pm
4
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.