Which Node to Use

Hello,

I have used several nodes to shape my data from a CSV data file.

The final node is a “Column Combiner” and my data looks perfect:

I would like to insert that data into a table in a Postgres table, row by row.

I know SQL perhaps too well, so I would like to write my own SQL statement to insert into the Postgres table.

I have written this insert statement:

INSERT INTO Cities (

CSDdguid

, Name

, CSDtype

, Population2021

, GeoLocation)

VALUES (

$CSDdguid$

, $Name$

, $CSDtype$

, $Population2021$

, $GeoLocation$

);

It appears to me that there are two nodes that support an SQL Insert statement: “DB SQL Executor” and “DB Looping”.

It seems I cannot use the “DB SQL Executor” because the control can only be associated with a database. I can’t set the Input Port to the Column Combiner. The node supports flow variables, of which I know nothing.

Can I use the “DB Looping” node? It appears to let me iterate through each row from the previous node, executing an insert statement against the Postgres table. However, I cannot link my “Postgres SQL Connector” connection to the “DB Looping” node. When I drag and drop the line from the db node to the looping node, it does not connect.

Any tips/suggestions most appreciated.

Richard Rogers