I have a MYSQL database with fields formatted as text or mediumtext for large text strings. In a workflow I want to write text from a table column "titel" to those fields but I get the following error message: Column "titel" of type "StringCell" from input does not match type "VARCHAR" in database. I am not sure but I think that I did not have this problem in version 2.6. Are there any suggestions how to solve the problem writing large text strings to the database fields?
Hi Jerry, within the Database Writer configuration, tab SQL types you can specifiy the size of the varchar(int) created in the database, have you done this in 2.6?
Yes, I tried it already with various settings for varchar (like 1024, 65000, and so on). None of the settings worked in 2.7 and I did not set it in 2.6.
Hi Jerry, do you see any error in the KNIME Console, can you please try to isolate the other columns to see if it real depends on this 'title' column? Cheers.
Table Creator (with one cell of short text, even below 255 chars) > Column Rename (to Titel) > Database Writer (append to a table with one field of the same name, field type: text)
...and got the same error message on the KNIME console.
Column "titel" of type "StringCell" from input does not match type "VARCHAR" in database at position 0. The position count depends on the position of the field in the database table. In this case it is the only field.
No, It works immediately if you reformat the database field to VARCHAR(255) without changing the name. I tried it also on different computers/installations of KNIME with the same result.
I found a work around by appending only those columns which are short text, date or int fields first and then afterwards use the Database Update node to fill in the fields formatted as text or mediumtext. Not really efficient but it works. Therefore, I think this is a bug in the Database Writer node.