MS SQL - Cognigy Documentation

Description

The SQL Node lets you run queries, transactions, or stored procedures on MS SQL Server.

Run Query

Runs a single SQL query statement.

Parameter Type Description
MS SQL Connection List Select MS SQL database connection. To create a new connection, click .
SQL Query CognigyScript Enter a valid SQL query in the Query field.

Result Storage

Parameter Type Description
Where to store the result List - Input — stores the result in the Input object.
- Context — stores the result in the Context object.
Input Key to store Result CognigyScript Enter the key where the result should be stored.

Advanced

Parameter Type Description
Stop on Error Toggle Lets you configure whether to stop Flow execution when an error occurs or not.

Run Transaction

Runs a transaction.

Parameter Type Description
MS SQL Connection List Select MS SQL database connection. To create a new connection, click .
Query CognigyScript Enter a valid SQL transaction query in the Query field. You do not need to add the “BEGIN TRANSACTION” and “COMMIT” fields, since this will be done implicitly. If you want to work with Try / catch blocks and do more advanced transactions with rollbacks, use Run Query instead.

Result Storage

Advanced

Run Stored Procedure

Runs a stored procedure. The stored procedure must exist in the database specified under Connection.

Parameter Type Description
MS SQL Connection List Select MS SQL database connection. To create a new connection, click .
Stored Procedure Name CognigyScript Enter the name of the stored procedure.
Inputs JSON Enter an array of input parameters of your stored procedure as defined in the database. You can forward parameters from the Context to the database, for example. Parameters must be specified in an array of objects that define the input parameter in the following format: {name,value,type}
Outputs JSON Enter an array of output parameters of your stored procedure as defined in the database. You can forward parameters from the database to the Context, for example. Parameters must be specified in an array of objects that define the output parameter in the following format: {name,value,type}

Result Storage

Advanced