MySQL Insert Documentation
Version: 2.9.7
Retrieved:Â 2025-10-09 15:16:07
My SQL Insert
This module inserts a flow message into a MySQL database row(s).
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Table Name | Not null | The name of the database table | Â |
| Source Property | Not null | The property that contains the values to be inserted | Â |
Credential
This module needs a credential of type 'Connection string' to connect to the database server. A minimal connection string is shown below. Depending on the setup of your database server additional parameters may be needed. Please consult the documentation for your server.
Server=tcp:192.168.0.5;Database=crosser;User ID=demo;Password=crosser123;
Input
For a single row insert the [Source Property] is expected to contain an object with property names matching all required column names in the database table. For multi-row inserts the [Source Property] is expected to contain an array of single-row objects.
| Name | Type | Description |
| [Source Property] | string | the name of the property that contains the object to be inserted into the database |
Output
An output message will be sent each time the module receives a message.
| Name | Type | Description |
| crosser.success | Boolean | True if the message was stored properly in the database, otherwise False |
| crosser.message | String | Contains a error message in case the insert failed, if the insert is successful this property is not set. |
Examples
Example 1
Inserts a single row into the table test. The table expects at least two columns name and reading:
# Settings
Source Property: info.data
Table Name: test
# Input
{
"id": 1
"name": "machine",
"info": {
"data": {
"name": "sensor1",
"reading": 489
}
}
}
Example 2
Inserts multiple rows into the table test. The table expects at least two columns name and reading:
# Settings
Source Property: info.data
Table Name: test
# Input
{
"id": 1
"name": "machine",
"info": {
"data": [
{
"name": "sensor1",
"reading": 489
},
{
"name": "sensor2",
"reading": 375
},
{
"name": "sensor3",
"reading": 961
}
]
}
}
Search Documentation
Destinations
Databases