Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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")