I have a imputation project that used to work in KNIME 3.7.x - now on 4.0.2
I use the MySQL Connector set as MySQL 8, but towards a Mariadb 10.3.12.
I get all data, for example, for a part of a day - or for a whole month and found out if any minute of data was lost, using ‘Create Date&Time Range’ node and doing linear calculations in ‘Missing Value’ node.
I get back a real good looking table…
However, when I try to write for example 60 lines of 71 data columns I get errors:
Error DB Writer … Execution failed … Duplicate entry on ‘2008-03-30 03:59:00’ for key ‘PRIMARY’
If changing DB Writer/Settings and unchecking ‘Fail on error’ I get:
“Error during preparation”
For example getting every of possible 1440 minute data between ‘2008-03-30 00:00:00’ and
‘2008-03-30 23:59:00’ and I get 1380 of them but missing between 60 minutes of data
between …02:00:00 and …02:59:00. But the results from ‘Missing Value’ node does a correct job and creates a table with the 60 minutes of data for all 71 columns. But it can’t be written!? See error messages above.
There is, as it should be one row of data with primary key of '2008-03-30 03:00:00, and I have run the ANALYSE on the table. which returns OK.
There are a few conversions of types from the database to KNIME back to Output for DB Writer:
DATETIME (Primary key) -> Local Date Time -> TIMESTAMP
DATE (key - separately indexed) - Local Date - DATE
DECIMAL -> Double -> Number (double) -> Double -> DECIMAL
VARCHAR(n) -> String -> String -> VARCHAR(n)
TINYINT -> Integer -> Number(integer) -> Interger -> TINYINT
Why would DB Writer object to try to write a line to the database, and that line is not part of what is supposed to be written… (Tested also DB Insert - same problem…
Glad for any light you can shine on this problem…