Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write


Description:

This Snap executes a stored procedure in the database and writes any parameters or results to the output view.


Expected upstream Snaps:  Any Snap with document output view

Expected downstream Snaps:  Any Snap with document input view

Expected input:  Input document may contain values for the Snap expression properties, typically for the Parameter values property.

Example:     "John" and "Smith" are values for the stored procedure's input parameters, the first and the second, respectively.

Code Block
{
firstName: "John".
lastName: "Smith"
}

Expected output:  Output document in the Result Set output view contains the result set of the stored procedure.


Prerequisites:

None


Support and limitations:

Works in Ultra Task Pipelines.

This Snap does not support the INOUT parameter type.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SAP HANA Accounts for information on setting up this type of account.


Views:


InputThis Snap allows at most 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.
OutputThis Snap has exactly two document output views, one regular output view and one Result Set output view. Data output is dependent on SAP HANA SQL Script and SAP HANA JDBC version and capabilities - defined in the SAP HANA account. Therefore, it is recommended to verify the behavior of the particular versions by executing the Snap and checking the output view results.
Error

This Snap has at most one document error view.


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.

Note

The values can be passed using the pipeline parameters but not the upstream parameter.

Example: dbo

Default value: [None] 


Stored Procedure Name


Required. Stored procedure to execute. The property is suggestible and will return all procedures of the DB. If a schema is defined, then it will return all procedures of that schema.

ExampleaddSeventeen
Default value: [None] 


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 has to be two string values provided.  The first value goes to p1 and the second to p2.

Default value: [None] 

Info

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. 

Note
 This property applies only to the Execute Snaps with SELECT statement or the Select Snaps. 

Default value: Not selected 
 

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Example


In this example, we are using schema QA_J in TEST_TABLE1.


The following is a sample stored procedure:


In the Snap, we specify the schema, the stored procedure called, and supply a parameter to specify the ID. If we define $num as 1, then the NAME value of A is returned.

Insert excerpt
SAP HANA Snap Pack
SAP HANA Snap Pack
nopaneltrue