In order to publish data to a database, you can use Database Publisher in an outgoing configuration.
Below are some samples you can use.
In order to use the Database Publisher, you need to restructure your data such as the below format.
{
"table": {
"name": "sample"
},
"fields": {
"city": "Groningen",
"name": "Alumio"
}
}
The above data will result in the below query to the database server.
Update
In case you need to update a row in the database, you need to restructure your data such as the below format.
{
"table": {
"name": "sample",
"primaryKey": "id"
},
"fields": {
"id": 1,
"city": "Groningen, NL",
"name": "Alumio, B.V"
}
}
The output query of the about JSON data is as below.
This payload can then be sent to a database publisher (outgoing configuration) using a route.
Search terms: sql insert mysql insert