Stored Procedure

Executes a Stored Procedure against a Relational Database.

Usage

You can view the list of supported databases and how to configure them in the Project Editor documentation. There is a separate Stored Procedure Node in the Node Selector for each database technology supported in Sanbox.

Configuring The Stored Procedure Node

Configuring a Connection

The Stored Procedure Node takes a connection object and tells it how to communicate with the database. You can configure Project level connections in the Project Editor.

Configuring the Procedure to Call

Specify a procedure name in the Procedure Name field. Depending on how your connection is configured, you may need to also specify the schema in the procedure name.

Parameters

You can add any number of parameters that will be mapped to the procedure. Each parameter can be set to be an in or out parameter. Clicking the negative (-) button removes the parameter.

Parameters support strings, numbers, and other primitive types for input. If an object or array is passed, it is turned into a JSON string.

Output

Running a SQL Server procedure using the configured example above yields the following object as output for the Node:

{
"resultSet": [
{
"ProductName": "Alice Mutton",
"Total": 30
},
{
"ProductName": "Carnarvon Tigers",
"Total": 18
},
{
"ProductName": "Chai",
"Total": 25
},
{
"ProductName": "Chartreuse verte",
"Total": 60
},
{
"ProductName": "Côte de Blaye",
"Total": 10
},
{
"ProductName": "Filo Mix",
"Total": 20
},
{
"ProductName": "Gnocchi di nonna Alice",
"Total": 40
}
],
"output": {},
"returnCode": 0
}

The resultSet property: Data that came back from your Stored Procedure.

The output property: If your procedure has any out parameters, this object will have a property for each parameter name with its value.

The returnCode property: This is the return code the Stored Procedure returned.