Inserting Binary Data into SQL Database Using KNIME

Hi @SnigdhaBiswas , I’ve put a demo workflow on the hub, using the H2 database as an example.

This uploads some binary files from the workflow’s data folder, and then reads the binary data back from the database, for display in a KNIME table.

On the H2 database, I defined the column as BLOB datatype.

create table IMAGES
(ID numeric(5),
IMAGE_BINARY blob)

In the DB Insert node, I set the data type mapping for Binary object as follows:

It didn’t work if I set it mapping to BLOB, but it worked for any of the other Binary mappings (BINARY, LONGVARBINARY, VARBINARY).

6 Likes