Hi,
i'm using the contrib node for Oracle DB to insert some values into the database.
There was already a thread with a similar issue: (Writing Insert query inside node-red-contrib-oracledb-mod).
The incoming msg.payload of the Oracle node is a nested object
object
Time: "2023-02-05T19:51:17"
ED300L: object
Total_in: 9627.902
Power_cur: 681
Total_out: 27910.92
Meter_id: "02560000000000"
I can copy the path to each of these elements into the field mapping of the node
[
"payload.Time",
"payload.ED300L.Total_in",
"payload.ED300L.Power_cur",
"payload.EDL300L.Total_out"
]
In the query I reference the four elements using bind variables
insert into stromzaehler (zeitpunkt, bezug, aktuell, lieferung)
values (:zeitpunkt, :bezug, :aktuell, :lieferung)
Executing the flow only null values will be inserted into the database table.
Any ideas what could have been going wrong here?