Insert Data in Structs??

image

I was wondering how can we insert data in a STRUCT using KNIME. Using Postgresql.

Like Name, Struct contains
first, middle and last name. All VARCHARS in here.

image

Hello shubhamss,
you can use the DB SQL Executor node to execute arbitrary DML statements such as

INSERT INTO YOUR_TABLE(name) VALUES('("FirstName","MiddleName","LastName")')

as described in the Postgres docu.
To execute multiple inserts use Loops, String Manipulation and FlowVariable nodes as described here.
When you want to read fields within a STRUCT you need to write your own SQL query e.g. by using the DB Query Reader or the DB Query node.

Bye
Tobias

4 Likes

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