Oracle - Stored Procedure
This page is no longer maintained (May 13, 2026). For the most current information, go to https://docs.snaplogic.com/snaps/sp-oracle/oracle-stored-procedure.html
On this Page
- 1 Overview
- 1.1 Breaking change
- 1.2 Behavior change
- 1.3 Settings
- 1.4 Examples
- 1.5 Downloads
Overview
You can use this Snap to execute stored procedures in an Oracle database and write OUT parameter values to the output view. If an OUT parameter is:
Custom type OBJECT, then the output is displayed as a JSON object.
Custom type TABLE, then the output is displayed as a JSON array.
This Snap supports executing stored functions with OUT and INOUT parameters and writes these parameters in the output view along with the returnval key.
Breaking change
With the 439patches29008Snap Pack version if any of your existing Oracle pipelines use the encoded ROWID(by manually handling the Base64 encoded data), your pipelines might break. To prevent your pipelines from failing, you must update your Snap Pack version to the latest version.
Snap type: | Write
| |||||||
|---|---|---|---|---|---|---|---|---|
Examples: | Example 1: Stored procedure has output parameters firstName, lastName and both are of built-in type VARCHAR2. The output document is: {
firstName: "John",
lastName: "Smith"
}Example 2: Stored procedure has three output parameters firstName, lastName, and hobbies where firstName and lastName are of built-in type VARCHAR2 and hobbies is of custom type TABLE. The output document is: {
firstName: "John",
lastName: "Smith",
hobbies:[
"swimming",
"reading",
"joking"
]
}Example 3: Stored procedure has three output parameters firstName, lastName, and location where firstName and lastName are of built-in type VARCHAR2 and location is of custom type OBJECT. The output document is: {
firstName: "John",
lastName: "Smith",
location: {
"ADDRESS":"1520 8th Ave N",
"CITY":"San Mateo",
"STATE":"CA"
}
}Example 4: Stored function accepts a customerId (NUMBER) and returns the customer's name (VARCHAR2).
The attribute names of OBJECT are not displayed with the default JDBC driver. With a custom JDBC driver, they are displayed as Field1, Field2, Field3, etc. User-defined types are only supported with a specific version of the JDBC driver. Refer to the JDBC Driver setting in Oracle Account.
There is a limitation in Oracle JDBC driver that prevents the passing of a record type parameters to the stored procedure. Refer the link: http://docs.oracle.com/cd/E11882_01/java.112/e16548/apxref.htm#JJDBC28928 A workaround could be to write a wrapper stored procedure to avoid passing of record type parameter directly to the original stored procedure. | |||||||
Known Issues | ||||||||
Support for Ultra pipelines | Works in Ultra Tasks. | |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Oracle Account for information on setting up this type of account.
| |||||||
Views: |
| |||||||
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 | Specify the database schema name. The suggestions in the Schema field are populated only when at least a single table exists in the schema. If no tables exist to use that schema, only SYS, SYSTEM, and XDB are populated. You can pass the values as expressions using the pipeline parameters but cannot use values from the upstream Snap. Default value: None | |||||||
Package name
| The package name where the procedure resides. The property is suggestible and will return all packages of the DB. If a schema is defined, then it will only return the packages of that schema. To invoke stored functions in a package, you need to upgrade the Oracle JDBC driver to 12.1.0.2 or later. User-defined types are supported only with a specific version of the JDBC driver. Refer to the JDBC Driver setting in Oracle Thin Account. | |||||||
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 | |||||||
Procedure sequence | Required for overloaded procedures. Sequence number that indicates the procedure to be used for overloaded procedures. The property is optional and only to be used when the selected procedure is overloaded. The starting index is always 1. The property is suggestible and will return the available indexes of the overloaded procedure, if any. The procedure sequence instructions apply similarly to stored functions. Example:
| |||||||
Ignore Null Parameters | ||||||||
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: There is a stored procedure named createGreeting. It has two input parameters: p1 and p2 of type VARCHAR2. Then you need to provide two string values. The first value goes to p1 and the second value goes to p2. Default value: [None] 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 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. | |||||||
Pass through
| If selected, the input document will be passed through to the output views under the key 'original'. The document will be passed to the Parameter output view, and it will also be passed to the Result Set output view if there is output sent from this view. This property applies only to the Execute Snaps with SELECT statement or the Select Snaps. Default value: Not selected
| |||||||
Custom type parameters mapping optional | Supports mappings for all parameters. | |||||||
Parameter index | The index is of the custom type parameter. It is suggestible based on stored procedure name.
| |||||||
Parameter type | The custom type name the parameter is of. Its suggestible based on database account.
| |||||||
Examples
We will provide two examples, the first one calls a simple stored procedure, the second one calls a procedure with user-defined type parameters.