I’ve tried to find a solution to my issue in these forums, via search engine, and anything else I can think of with no success, so I’m posting my first topic to see if I can get a solution here.
I am reading from a Postgres table in a “1.0” database, manipulating field names, adding a constant column value, and writing to a “2.0” database table. It looks to me like KNIME doesn’t like, or know how to handle the Postgres uuid data type as I get the following error:
ERROR DB Insert 0:13 Execute failed: Batch entry 0 INSERT INTO “###”."###" (“MyPK”, “###”, “###”, “###”, “###”) VALUES (‘2a6210c6-971d-4f1a-8752-12daa4b7e3b4’,’###’,NULL,NULL,3) was aborted: ERROR: column “MyPK” is of type uuid but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
(I’ve replaced table and field names in the error message, with the exception of the uuid/guid I’m trying to insert into.)
I can paste the SQL statement directly into PgAdmin and it works fine, but not in KNIME using a DB Insert node. I’ve also tried adding the braces in the string (i.e., “{}”), but that doesn’t help.
It looks to me like this is an issue between JDBC and SQL, based on some articles I’ve found, but all of the solutions make changes inside Java… not inside KNIME.
How do I handle this so the string-encoded uuid will insert?