Oracle - Stored Procedure

On this Page

Snap type:



This Snap executes a stored procedure in an Oracle database and writes the values of OUT parameters to the output view. If an OUT parameter is of custom type OBJECT, then its displayed as a JSON object. If the OUT parameter is of custom type TABLE, then it is displayed as a JSON array. This Snap also supports executing stored functions and writes the return value to the output view in a "returnval" key.  However, it does not support OUT and IN/OUT parameters for stored functions.

Example 1: Stored procedure has output parameters firstNamelastName 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",

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",

Example 4: Stored function accepts a customerId (NUMBER) and returns the customer's name (VARCHAR2).
The output document is:


   "returnval": "Acme Corporation"


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:

A workaround could be to write a wrapper stored procedure to avoid passing of record type parameter directly to the original stored procedure.



Support and limitations:Works in Ultra Task Pipelines.

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.


This Snap allows none or one input view. If an input view is defined, then values from an incoming document can be used as input parameters to the stored procedure.
Note: The attribute names of custom type OBJECT are case-sensitive. For example, for custom type LOCATION with three fields ADDRESS, CITY and STATE, the input below is acceptable:

                            "ADDRESS":"1520 8th Ave N",
                            "CITY":"San Mateo",
But the input below won't be accepted:
    location: {
                             "address":"1520 8th Ave N",
                            "city":"San Mateo",
OutputThis Snap has exactly two document output views, Output Parameters and Result Set.

This Snap has at most one error view and produces zero or more documents in the view.



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: TECTONIC 

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. 
Example: PACKAGE2

To invoke stored functions in a package, you need to upgrade the Oracle JDBC driver to 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.

Default value: [None] 

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.


  • A procedure sp1 exists in a package pkg1 as sp1 (arg1, arg2) and sp1 (arg1, arg2, arg3), then the sequence number defines which procedure is used. Sequence number 1 uses sp1 (arg1, arg2) and sequence number 2 uses sp1 (arg1, arg2, arg3)
  • A function f1 exists in a package pkg1 as f1 (arg1, arg2) and f1 (arg1, arg2, arg3), then the sequence number defines which function is used. Sequence number 1 uses f1 (arg1, arg2) and sequence number 2 uses f1 (arg1, arg2, arg3).
Ignore Null Parameters

Select this check box to enable the Snap to ignore the parameters evaluated as null. This applies to parameters with defined default values.

Default value: Not selected

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


Supports mappings for all parameters. 

       Parameter index

The index is of the custom type parameter.  It is suggestible based on stored procedure name.

  • The first parameter's index is 1 for stored procedures. 
  • The first parameter's index is 2 for stored functions. 
  • The return value has index 1 for stored functions.

        Parameter type

The custom type name the parameter is of.  Its suggestible based on database account.

Snap Execution

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.


We will provide two examples, the first one calls a simple stored procedure, the second one calls a procedure with user-defined type parameters.

 1. Calling a simple Stored Procedure

In this example we want to call stored procedure TEST_PROC.

Here is the definition of stored procedure TEST_PROC:

    in_sbset_id         IN  NUMBER
    ,test_date          IN  DATE
    ,test_timestamp     IN  TIMESTAMP
    ,test_timestamptz   IN  TIMESTAMP WITH TIME ZONE
    ,test_timestampltz  IN  TIMESTAMP WITH LOCAL TIME ZONE
    ,out_result         OUT VARCHAR2

    l_sql_statement VARCHAR(4000);

    DBMS_OUTPUT.PUT_LINE('test_date : ' || test_date);
    DBMS_OUTPUT.PUT_LINE('test_timestamp : ' || test_timestamp);
    DBMS_OUTPUT.PUT_LINE('test_timestamptz : ' || test_timestamptz);
    DBMS_OUTPUT.PUT_LINE('test_timestampltz : ' || test_timestampltz);
    l_sql_statement := 'INSERT INTO TEST_TABLE VALUES (
                           TO_DATE('''||test_date||''',''DD-MON-YYYY'') ,
                           TO_TIMESTAMP('''||test_timestamp||''') ,
                           TO_TIMESTAMP_TZ('''||test_timestamptz||''') ,
                           CAST('''||test_timestampltz||''' AS TIMESTAMP WITH LOCAL TIME ZONE))';
    DBMS_OUTPUT.PUT_LINE('l_sql_statement ::  '||l_sql_statement);
    EXECUTE IMMEDIATE l_sql_statement;

    out_result := 'SUCCESSFUL';

 First, we use an Oracle Execute Snap, to get some input data from table TEST_TABLE.

Then, we use a Mapper Snap to map the data from the Oracle - Execute Snap to the Target paths, which the Oracle Stored Procedure Snap uses later.

In the Oracle Stored Procedure Snap, we define the stored procedure and parameters.

Upon validation, we see the output preview of the Oracle Stored Procedure Snap as shown below:

 2. Oracle Stored Procedure with user-defined parameters

In this example we will call a Oracle Stored Procedure PROC_WITH_CUSTOM_IN_PARAM which has parameters of user-defined types.

Here is the definition of the stored procedure PROC_WITH_CUSTOM_IN_PARAM:

    pPairsCount     IN  NUMBER
    ,pPrefix        IN  VARCHAR2
    ,pINMUIDS       IN  STRARRAY32
    ,pMUIDs         OUT STRARRAY32
    ,pAuthKeys      OUT STRARRAY49
    ,pDemoPeriod    OUT NUMBER
    ,pTransID       OUT NUMBER
    ,pErrorCd       OUT NUMBER
    ,pErrorMsg      OUT VARCHAR2

    select COUNT('s') Into pTransID from ACTRESS a;
    pMUIDs := STRARRAY32();
    pAuthKeys := STRARRAY49();
    pMUIDs(1) := inMUIDS(1);
    pAuthKeys(1) := 'ABCD-r2mi-7vax-xn3m-hahj-2bqa-ev6f-dn3r-225x-ABCD';
    pErrorCd := 0;

        pErrorCd := 1;
        pErrorMsg := 'Some Error Happened.';


First we use a JSON Generator Snap to pass parameter values as shown below to the Stored Procedure Snap:

Then we use the Stored Procedure Snap procedure name and define parameter values. As there are several parameters that are user-defined types, we add custom type mapping for them. Each mapping row consists of parameter index and type. Parameter index is the index when it is defined, and the parameter type is the name of the user-defined type. You can also use the Suggest button to get the list of available indices or types and select the needed one.

Upon validation, we see the output preview of the Oracle - Stored Procedure Snap as shown below:

 3. Calling a simple stored function with custom type mapping

This Pipeline demonstrates invoking a stored function using the Oracle Stored Procedure Snap by defining a custom type mapping and documenting the indexing behavior. The return value has index 1 and the first parameter has index 2.

The code in the following section defines the stored function - payroll_pkg.employee_info.

We use the Oracle Execute Snap to query people table.

Then, we use the Mapper Snap to map Employee ID and Full name.

We use the Oracle - Stored Procedure Snap and select the stored procedure.

The Oracle Stored Procedure Snap invokes a stored function to lookup employee information, such as the employee's salary and hire date. The function accepts an Employee ID and returns a table of custom types (employee).


Important steps to successfully reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

  File Modified

File Example_Stored_procedure.slp

Feb 23, 2022 by Subhajit Sengupta

File Example_Stored procedure_Custom_output_types.slp

Feb 23, 2022 by Subhajit Sengupta

Snap Pack History

 Click to view/expand
Release Snap Pack VersionDateType  Updates
August 2022main17386 StableEnhanced the Oracle - Merge and Oracle - Update Snaps with the Session parameters fieldset that provides National Language Support (NLS).
4.29 Patch429patches16603 Latest
  • Fixed an issue with Oracle Bulk Load Snap where the Snap encountered an error when trying to load data into Timestampwithtimezone datatype field.

  • Fixed an issue with Oracle Execute Snap where the Snap did not display a valid error message when the delete condition was invalid.

  • Fixed an issue with Oracle - Merge Snap where the Snap displayed an error when the RetryInterval and Number of Retries fields were expression enabled and the values were passed using the Pipeline parameters.

  • Fixed an issue with the Oracle Stored Procedure Snap where the Snap errored out due to an upgrade made to HikariCP that caused a conditional failure and prevented the downstream Snaps to supply the parameters to the stored procedure. 

  • Enhanced the Oracle - Merge and Oracle - Update Snaps with the Session Parameters fieldset that provides National Language Support (NLS).





Upgraded with the latest SnapLogic Platform release.

4.28main14627 Stable
  • Enhanced the Oracle - Update Snap to accept values in the Number of Retries and Retry Interval (seconds) fields from Pipeline parameters only. 

  • Enhanced the Oracle Bulk Load Snap with the Column Length Overrides field set to support CLOB (Character Large Object) and NCLOB (National Character Large Object) data types that may require a large buffer size, allowing users to load large amounts of data into a single column store of data type CLOB or NCLOB.

  • Updated the label for Delete Condition to Delete Condition (Truncates Table if empty) in the Snap Oracle Delete Snap
4.27main12833 Stable
  • Enhanced the Oracle - Execute Snap to invoke stored procedures.
  • Enhanced the Oracle Bulk Load Snap with Additional SQL Loader Parameters field set to define additional SQL Loader parameters if required.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25425patches11008 Latest
  • Improved the support for the CLOB data type in the Oracle - Insert Snap. 
  • Improved the error messages for all the Snaps in the Oracle Snap Pack where the Snaps fail with Null Pointer Exception when the account reference provided is invalid. 
StableUpgraded with the latest SnapLogic Platform release.
  • Enhances the Oracle - Select Snap to return only the selected output fields or columns in the output schema (second output view) using the Fetch Output Fields In Schema check box. If the Output Fields field is empty all the columns are visible. 
  • Enhances the Oracle - Stored Procedure Snap to ignore the parameters evaluated as null by using the Ignore Null Parameters check box. This applies to parameters with defined default values.
StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.
4.21 Patch421patches6272 Latest

Fixes the issue where Snowflake SCD2 Snap generates two output documents despite no changes to Cause-historization fields with DATE, TIME and TIMESTAMP Snowflake data types, and with Ignore unchanged rows field selected.

4.21 Patch421patches6144 Latest

Fixes the following issues with DB Snaps:

  • The connection thread waits indefinitely causing the subsequent connection requests to become unresponsive.
  • Connection leaks occur during Pipeline execution.
4.21 PatchMULTIPLE8841 LatestFixes the connection issue in Database Snaps by detecting and closing open connections after the Snap execution ends.



Updated the Oracle Thin Account and Oracle Thin Dynamic Account, enabling them to connect via Oracle Active Data Guard (ADG).

4.20 Patch 


Enhances the Oracle Snap Pack to support connections to the Oracle ADG (Active Data Guard) URL.

4.20 Patch 

db/oracle8803  Latest

Support for Oracle Database 19c.

StableUpgraded with the latest SnapLogic Platform release.
4.19 Patch db/oracle8408 Latest

Fixes an issue with the Oracle - Update Snap wherein the Snap is unable to perform operations when:

  • An expression is used in the Update condition property.
  • Input data contain the character '?'.
StableUpgraded with the latest SnapLogic Platform release.
4.18 Patchoracle7786 Latest

Fixes an issue using the NVARCHAR2 datatype in Oracle databases when the character set is not AL32UTF8. However, a known issue is that special characters display as (question).

StableUpgraded with the latest SnapLogic Platform release.
4.17 Patch db/oracle7459 Latest

Fixed an issue with the Oracle Stored Procedure Snap wherein the Pipeline execution fails with an error when the input data type is CLOB.


Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

  • Fixed an issue with the Oracle Execute Snap wherein the Snap would send the input document to the output view even if the Pass through field is not selected in the Snap configuration. With this fix, the Snap sends the input document to the output view, under the key original, only if you select the Pass through field.
  • Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 Patch 

db/oracle6919 Latest

Added a new property, Session parameters, in the Oracle Insert Snap to enable the use of National Language Support (NLS) parameters.

4.16 Patch 

db/oracle6824 Latest

Fixed an issue with the Lookup Snap passing data simultaneously to output and error views when some values contained spaces at the end.

StableUpgraded with the latest SnapLogic Platform release.
4.15 Patch db/oracle6534 Latest

Improved performance in Pipelines that contain child Pipelines.

4.15 Patch db/oracle6417 Latest

Fixed an issue with data types conversion. All fields with byte, short, int, or long data types will be converted to BigInteger after fetching.

4.15 Patch db/oracle6284 Latest

Replaced the existing Max idle time and Idle connection test period properties with Max life time and Idle Timeout properties respectively, in the Account configuration. The new properties fix the connection release issues that were occurring due to default/restricted DB Account settings.

StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.

4.13 Patch 

db/oracle5192 Latest
  • Fixed the Oracle Bulk Load Snap that stores special characters incorrectly in the target table.
  • Fixed the Oracle Bulk Load Snap that throws a NullPointerException error when the input letter case does not match with that of the Oracle table.


StableUpgraded with the latest SnapLogic Platform release.
4.12 Patchoracle4862 Latest

Fixed an issue in the Oracle Bulk Load Snap that fails to execute the SQLLDR (SQL Loader) command, while also enhancing the support for the TCPS protocol.

4.12 Patch db/oracle4721 Latest

Added a property, "SSL/TCPS" for Oracle Account.

4.12 PatchMULTIPLE4744 Latest

Enabled expression for Delete Condition in Oracle Delete Snap. 



StableUpgraded with the latest SnapLogic Platform release.

4.11 Patch 

db/oracle4369 Latest

Enhanced the Oracle Bulk Load Snap to accept date-type values in the format "yyyy-mm-dd".

StableUpgraded with the latest SnapLogic Platform release.
4.10 Patchoracle3633 Latest

Fixed BULK LOAD so it adds the thread name to the name of the temporary directory. This allows multiple BULK LOAD Snaps within a single pipeline.




Added Auto commit property to the Select and Execute Snaps at the Snap level to support overriding of the Auto commit property at the Account level.

4.9.0 Patch

oracle3188 Latest

Fixed the issue that "NaN" check was done to unexpected data types like varchar.

4.9.0 Patch

oracle3096 Latest

Fixed a class casting issue for custom data types(BLOB, CLOB, NCLOB, etc) when custom Oracle JDBC driver is used.

4.9.0 Patch

oracle3071 Latest

Fixed an issue regarding connection not closed after login failure; Expose autocommit for "Select into" statement in PostgreSQL Execute Snap and Redshift Execute Snap.

StableUpgraded with the latest SnapLogic Platform release.

4.8.0 Patch




Fix for SQL*Loader interpreting white-space only data as null values.

4.8.0 Patch



Potential fix for JDBC deadlock issue.

4.8.0 Patch

oracle2711 Latest

Fixed Oracle Snap Pack rendering dates that are one hour off from the date returned by database query for non-UTC Snaplexes.




Database accounts now invalidate connection pools if account properties are modified and login attempts fail.

4.7.0 Patch

oracle2190 Latest

Fixed an issue for database Select Snaps regarding Limit rows not supporting an empty string from a pipeline parameter.



  • pdated the Oracle - Stored Procedure Snap with the Pass through field. 
  • Resolved an issue in Oracle - Stored Procedure Snap that caused invalid column type failures.
  • Oracle - Bulk Load updated to handle dates the same way as Oracle - Insert. Acceptable format for timestamp strings:
    • Prior to 4.7, the only acceptable timestamp format was  "yyyy-mm-dd hh:mm:ss.SSS", such as 2016-11-07 10:55:12

    • It now also supports:

      • ISO8601 formats (plus fractional seconds) without timezone.

             "yyyy-mm-ddThh:mm:ss.SSS", (ex: 2016-11-07T10:55:12)
             "yyyymmddThhmmss.SSS", (ex: 20161107T105512)

      • ISO8601 formats with time zone. ONLY 'zulu' and 'UTC' at this time. Note that there is no space before the 'Z' but is a space before the 'UTC'.


             "yyyy-mm-ddThh:mm:ss.SSS UTC"
             "yyyymmddThhmmss.SSS UTC"

             ex: 2016-11-07T10:55:12Z
             ex: 20161107T105512Z

             ex: 2016-11-07T10:55:12 UTC
             ex: 20161107T105512 UTC

        The ISO8601 format is used by many web services, Oracle Bulk Loader, and others.

  • Resolved an issue in Oracle Select Snap that caused failures in the second output view when retrieving outputs from a table with a dot (.) character.
  • Enhanced the Oracle Select Snap to fully support SQL statements with/without expressions & SQL bind variables.
  • Extended support for Oracle Thin Dynamic accounts.


  • Updated the Bulk Load Snap with a new field, Use direct path load, to enhance bulk loading performance.
  • Resolved an issue with Oracle Select Snap failing if the table name included a dot (.) character.
4.4.1NA Stable
  • Oracle Select: Resolved an issue with database access error occurring while iterating over table name result set when using an uploaded driver with a different version than the bundled driver.
  • Resolved an issue with Oracle Stored Procedure Snap not accepting CLOB data.
  • Made improvements to JDBC auto-commit consistency.
4.4NA Stable
  • Table List Snap: A new option, Compute table graph, now lets you determine whether or not to generate dependents data into the output.
  • Oracle Bulk Load
    • Resolved an issue with a pipeline never completing.
    • Resolved an issue with pipeline statistics, bulk load summary statistics not matching and bulk load summary was confusing.
    • Maximum error count field added to set the maximum number of rows which can fail before the bulk load operation is stopped.
    • Mixed-case matching option removed.
    • Added error messaging to handle BLOB type data trying to be loaded to an Oracle table when not supported.
    • Resolved an issue with the record separator of the input file not being processed correctly.
    • Improved error messages for when data types do not match.
  • Oracle Stored Procedure: All accessible objects are now visible during design.
4.3.2NA Stable
  • Resolved an issue with Oracle Select not reading table names: Database access error occurred while iterating over table name result set.
  • Resolved an issue with Oracle Bulk load failure: String index out of range: -1.
NANA Stable
  • Oracle Lookup failed in preview if DATE column was used for Lookup conditions
  • Dynamic DB queries now supported in the Execute Snap.
  • The SQL statement property now can be set as an expression property. When it is an expression, it will be evaluated with each input document and one SQL statement per each input document will be executed.
  • Known issue: When the SQL statement property is an expression, the pipeline parameters are shown in the suggest, but not the input schema.
  • With the SQL statement property set as an expression, the Snap can be exposed to SQL injection. Please use this feature with caution.
  • Oracle Insert: When a string value is entered into a date col, its successfully inserting into db with null
  • Oracle Stored Procedure: parameter type list was not populating even if a procedure had custom types defined.
NANA Stable
  • Oracle Execute error - no more documents will be written to SLFS
  • Oracle Execute Snap failing with maximum number of documents reached
  • Oracle Select Snap - Early dates are corrupted when reading data
  • Oracle select- with date data type does not return Time(hh:mm:ss)
  • Oracle Stored Procedure fails with error- Reason: invalid name pattern: TECTONIC.null
  • Oracle Stored Procedure - fails with - "invalid name pattern: TECTONIC.strarray32 " when type name given in lower case
NANA Stable
  • The version number of the default Oracle JDBC driver (shared/ojdbc-6.1.jar) is now
  • Fixed the following defects:
    • Oracle Stored Procedure: suggest method for parameter index throws -Suggestion value cannot be empty for property: customTypeParameterIndex
    • Oracle Stored Procedure: Parameter index suggest throws "invalid path" when no schema nor procedure is selected

    • Oracle Stored Procedure: If there is no type defined in Schema, suggest throwing Suggestion value cannot be empty for property: customTypeParameterType

    • Oracle Stored Procedure: When custom type created in different schema, its not populating through Snap
    • Oracle Select- Order by property as parameter fails
    • Oracle Stored Procedure: Parameter type list- Can we make it in an order
    • Oracle Snaps- When in account given a username which dont have privileges to access other schema, upon suggest all schema 's are populating
    • Oracle Stored Procedure: NPE
    • Oracle Stored Procedure: invalid name pattern: TECTONIC.STR_ARRAY_32_$
    • Oracle Stored Procedure: Procedure name mismatch error - suggest from parameter type when no package selected
    • Oracle Stored Procedure: When in a schema if there are no types defined, showing null in type and index value
    • Oracle Merge: error: "SQL operation failed"
    • Oracle merge condition when expression is enabled, input schema in not getting populated
    • Oracle Merge with expression more than 2 columns not working.getting Invalid identifier
    • Oracle Merge: When expression enable- Fails with Failure: Could not evaluate expression:
    • Oracle Stored Procedure: Failure: Failed to execute callable statement. Cause: invalid name pattern: TECTONIC.null.