DB Insert node and Snowflake Column Type: VARIANT


I am trying to write a JSON Object to Snowflake field is of the type VARIANT. But I am not seeing any mapping in the DB Insert node that would support VARIANT Data Type. Please advise.


Hi Saqib,
KNIME does not support writing to VARIANT type in Snowflake. It also seems that the JDBC driver itself does not support it according to this Snowflake post.
Unfortunately you can not alter the automatically generated PreparedStatements in KNIME to add the necessary TO_VARIANT function. So you can either generate the whole insert statement yourself e.q. by using the String Manipulation node and then executing it via the DB SQL Executor node or you insert the data into a temporary table as string and then issue a INSERT statement that reads the value from the temporary table and that uses the TO_VARIANT function on the JSON column.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.