passing out parameters to tOracleSP

One Star

passing out parameters to tOracleSP

How do define out parameter for tOracleSP .. My stored proc return a curzor back so i need to pass a out parameter of type cursor to the stored proc..Could not find any info in the user guide
Thanks
rizz
One Star

Re: passing out parameters to tOracleSP

Anybody ???????????????
Community Manager

Re: passing out parameters to tOracleSP

Hi
When defining the schema of tOracleSP, Add a column for out parameter and select 'out' as the parameter type.(see the screenshot)
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: passing out parameters to tOracleSP

No it does not work .Please see my stored proc code after the exception.
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'REFGETUNPROCESSESEVENTS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:783)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2979)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4103)
at batch.newjob.newjob.tOracleSP_1Process(newjob.java:169)
at batch.newjob.newjob.runJob(newjob.java:331)
at batch.newjob.newjob.main(newjob.java:267)
Job newjob ended at 17:15 28/01/2008.

This is my stored proc :::
Procedure refGetUnProcessesEvents(P_RETURN_QRY1 OUT SYS_REFCURSOR)
IS
last_event number;
current_max_event number;
Begin
Select Maxevent into last_event from processed_events;
select max(eventid) into current_max_event from update_event;
Open P_RETURN_QRY1 for select distinct entityid as entity_id,entitytype as entity_typ,actiontype as action_type,5
as entity_updated_flag ,entrytimestamp from update_event where eventid>last_event and
eventid<=current_max_event;
update processed_events set Maxevent=current_max_event;
commit;
EXCEPTION
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('No updates found');

END refGetUnProcessesEvents;
One Star

Re: passing out parameters to tOracleSP

Hi Shong ... any updates on how to use??
One Star

Re: passing out parameters to tOracleSP

Hi Shong ... any updates on how to use??
One Star

Re: passing out parameters to tOracleSP

Is this feature not supported by Talend ??..Can anybody help me ??
Community Manager

Re: passing out parameters to tOracleSP

Hi Rizz
Currently, Talend doesn't return user-defined type as the out type. Can you report this feature on our bugtracker?
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Employee

Re: passing out parameters to tOracleSP

Set your column as Object type and use the tParseRecordSet to parse your results.
One Star

Re: passing out parameters to tOracleSP

where do i find this component.Iam using TOS 2.2.4.I could not find this
Employee

Re: passing out parameters to tOracleSP

I's only available since 2.3.0M1 in Databases Family (near the tCreateTable) in Java project (see components page)
Regards,