Dear KNIME Community,
I am hoping that you are able to help me out with a challenge with the database nodes.
I am trying to use KNIME to do following steps:
- Read various files,
- define columns (by algorithm),
- load the result (=table) into a SQL database.
The challenge: The number of SQL database fields for different output tables vary and their length&data types are predefined (e.g. table 2: "nvarchar (3), datetime, nvarchar (10), nvarchar (12), datetime", whereas the next table could consist "nvarchar (4), nvarchar (20)")
Unfortunately, I do not see any solution to provide the correct length&data type to a variable number of SQL fields. My attempt to abuse the Parameterized Database Query to run an SQL INSERT / REPLACE command provided by a variable was also not successful. Nevertheless, I am successful to create empty sql tables with the Database SQL Executor node.
Does anybody have a solution for me?
Bonus point: It would be great if the solution would also be able to update database rows in one step (see REPLACE command).
Thank you in advance!
linkm
PS: Thank you for KNIME @developers!