SQL Node
SQL Node
Article summary
Did you find this summary helpful?
Thank you for your feedback
SQL Node
The SQL node uses a connection string to communicate with an SQL server. It can be used to run SQL queries within the Rayven workflow and will output the results in the payload for each applicable device.
Adding a SQL node to your workflow
- First, select your desired solution and navigate to Rayven Workflow.
- Select ‘Inputs’ from the left-hand panel.
- Find the SQL node and drag it onto the canvas.
- Connect your SQL node to another node to provide an input.
- Double click on the SQL node to open its configuration window.
Configuring your SQL node
- Give your node a name. Choose something simple that clearly explains its purpose. You must pick a name that has three or more characters.
- Select the Database Type for the SQL server you want to query from the drop-down options (MySQL or MSSQL).
- Enter the Connection String for the database.
- Enter the SQL Query. Use the notation [[my_field]] to take a field from the incoming JSON and place it in the query. If using the 'Auto Field Insert' checkbox, enter only the table name in this field.
- You can enter a Variable Name For Result if you want to define the name of the field that will contain the results from the SQL query.
- Auto Field Insert will query the database to get a list of fields in the table, check what fields with the same names exist in the JSON payload, then execute an INSERT for fields that exist in both. To use this option, enter only the table name in the SQL Query field.
- Check Use Replace Into if you want the Auto Field Insert to execute a 'REPLACE INTO' rather than an 'INSERT INTO' function.
Activation
Once you have configured the node, click 'activate' and then 'save'. The node is now ready to send data into the workflow.
See Also: Adding devices
As of Release: 08.12.2021