Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to read rows returned from function with tdbsp component

Hi,

 

I am trying to use a function in tdbsp component and want to use the result returned by function in tdbrow component(update statement).

 

tdbsp(function)----->tdbrow(update)

 

I am getting null value as a function result and hence update is not working as expected but am able to print the result returned by function in tlogrow.

 

Please suggest how can i do this.

Labels (3)
1 Reply
vapukov
Master II
Master II

tDBSP do not create a dataflow, you can use tParseRecordSet to extract data - https://help.talend.com/reader/WQvDLxgl6A~aKwyHRPy4mQ/8v7UKcrJqPWj_qBKWYqyxg 

 

but often the more simple way - just to use tDBInput instead of tDBSP if you need proceed returned data

the source of tDBInput could be any query (not only SELECT col1 FROM tableX), such as:

- exec udp_MyStoredProcedure X Y Z (call udp_MyStoredProcedure)

- SELECT my_func(X,Y)

 

related to your parallel question - you can use a prepared query with variables stored by tFlowToIterate to prepare proper call:

"EXEC udp_MyProcedure "+(String)globalMap.get("row1.col1") + " " + (Long)globalMap.get("row1.col2")