Pentaho

 View Only

 Pentaho - Call Stored procedure with 1 input parameter and Refcursor output (multiple output fields) with multiple rows

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Sirisha Reddy's profile image
Sirisha Reddy posted 11-28-2018 18:40

Hello,

I'm not sure if this is he right place to post as 'm new. Excuse me if it wrong and please tag to right group who can help for a solution.

I'm trying to get the output of a stored procedure

in oracle that has 1 input parameter lets say DEPT_NO and get out fieldsDEPT_NO, DEPT_TYPE, DEPT_SERIAL ,DEPT_NAME to Pentaho and load this output to another DB. The output returns multiple rows.

Please see below SP. It returns multiple rows.Can you please help me with the details steps in Pentaho Spoon? Steps/how to

call. If there is a different way to write SP and call in Pentaho , Please let me know. Thank you in advance.

CREATE OR REPLACE PROCEDURE TEST

( P_DEPT_NO NUMBER, C_COLSOUTPUT OUT SYS_REFCURSOR ) ASBEGIN OPEN C_COLSOUTPUT FORSELECT DEPT_NO ,DEPT_TYPE ,DEPT_SERIAL ,DEPT_NAME FROM DEPT_SP WHERE DEPT_NO=P_DEPT_NO;END;DEPT_NO DEPT_TYPE DEPT_SERIA LDEPT_NAME

Output when Input Parameter Dept_NO=1 :

DEPT_NO

DEPT_TYPE

DEPT_SERIAL

DEPT_NAME

1

1

A

ANAME

1

1

F

ANAME

1

1

G

ANAME


#Pentaho
#PentahoDataIntegrationPDI
#Kettle
Thorsten Planitz's profile image
Thorsten Planitz

Hi,

what version of spoon you are using?

Do you use it stand alone?

Maby you have to use a "Generate Input Row" Step than go with a hop to a "Call DB Procedure" Step.

Best regards

T.

Data Conversion's profile image
Data Conversion
Attachment  View in library