SQL Node

Provides access to external SQL tables. This allows users to run queries on data from an SQL table and bring it into Rayven's workflow, and to insert data into an SQL table from the Rayven workflow.

Functionality

The SQL node can use payload fields to perform SQL queries.

Outputs

The SQL node fetches data using a user-defined SQL query.

How to Use

Implementation

In the Rayven Workflow Builder:

  • Select Inputs.
  • Drag the SQL node to the canvas.
  • Provide an input to the SQL node by connecting it to another node.
  • Double click on the SQL node to open the configuration window.

Configuration

Section: General

This section contains basic configuration elements required for any SQL node implementation.

Field

Requirement

Comments

Node Name

Mandatory

Enter a name for this node.

This provides a handle to which you and others can refer, so it should be simple but meaningful and explain the node’s purpose.

Database Type

Mandatory

Select the database type for the target SQL server. Format must be selected from the drop-down menu 

  • MySQL
  • MSSQL

Connection String

Mandatory

Enter the string for connecting to the database. For example:

server=abc.rayven.io;port=3307;User Id=UserID;password=YourUniquePassword;

SQL Query

Mandatory

Enter the SQL query. The notation [[my_field]] can be used to take a field from incoming JSON and place it in the query.

When using the 'Auto Field Insert' checkbox, Enter only the table name in the 'Query' field.

Variable Name For Result

Optional

This will be the name of the field that will contain the results from the SQL query.

Auto Field Insert

Optional

Enter only the table name in the 'Query' field.

This option will query the database to get a list of fields in the table. Then check what fields with the same names exist in the JSON payload and then execute an INSERT for fields that exist in both.

Use Replace Into

Optional

When checked, the 'Auto Field Insert' will use  'REPLACE INTO' instead of 'INSERT INTO'. (Only relevant when 'Auto Field Insert' is checked).

Activation

Once the device filters have been selected, click the 'Activate' button and then click 'Save'. The node is ready to receive data into the workflow.