Azure SQL - Stored Procedure
On this Page
Snap type: | Write | ||||||
|---|---|---|---|---|---|---|---|
Description: | This Snap invokes a stored procedure in the Azure SQL Database. If the procedure contains any OUT parameters, they are written to the output view. ETL Transformations & Data FlowThis Snap enables the following ETL operations/flows: Ideally, there is no data flow from the Snap to the database, however, the results computed in the store procedure or the result of queries executed in the stored procedure can be fetched by the Snap through output parameters. Input & Output
| ||||||
Prerequisites: | The SP to be invoked must be created before executing the Snap. | ||||||
Limitations and Known Issues: |
| ||||||
Configurations: | Account & AccessThis Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Azure SQL Account for information on setting up this type of account. Views
| ||||||
Troubleshooting: | Ensure the input provided (Schema name and SP name) is correct. Ensure the input parameters are provided correctly. | ||||||
Settings | |||||||
Label
| Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||||||
Schema Name
| The schema name where the procedure resides. The property is suggestible and will return all schemas of the DB. The values can be passed using the pipeline parameters but not the upstream parameter. Example: dbo
| ||||||
Stored Procedure Name | Required. Stored procedure to execute. The property is suggestible and will return all procedures of the DB. If a package is defined, then it will only return the procedures of that package. If a schema is defined and no package is defined, then it will return all procedures of that schema. Example: addSeventeen
| ||||||
Parameter Values
| Select the input parameter values for the stored procedure. If you define parameter values, you must do so in the same order as they appear in the stored procedure definition. Example: Suppose there is a stored procedure named createGreeting. It has three parameters p1,p2, and p3. p1 and p2 are input parameters of type VARCHAR2. Then there have to be two string values provided. The first value goes to p1 and the second to p2. Quotation marks should not be used when setting input parameters unless they are part of the input value itself, since they are treated as escaped plain characters. For example, if the desired input value is TEST_VALUE1, the input parameter should be set as TEST_VALUE1, if you set it as "TEST_VALUE1", it will be recognized as \"TEST_VALUE1\". If you do not provide any parameters in the given Snap, you can still view the required input parameters in the Target Schema of the upstream Mapper Snap. The parameters are dynamically populated based on the column keys of the stored procedure; you can map the parameters and pass them as an input to the Stored Procedure Snap. Default value: [None] | ||||||
|
| ||||||
Basic Use Case
The following pipeline describes how the Snap functions in a pipeline:
The Azure SQL Stored Procedure Snap invokes the Stored Procedure, Emp_Select_2,
The Stored Procedure as created on the Azure SQL Database:
Create PROCEDURE Emp_Select_2(
@emp_id INT -- Input parameter
)
AS
BEGIN
SELECT * FROM dbo.Emp_Details WHERE emp_id=@emp_id
END
The value passed through the upstream:
The Azure SQL Stored Procedure Snap invokes the stored procedure EMP_Select_2:
The output parameters output preview:
The result set output preview:
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2026 SnapLogic, Inc.