Reputation: 1170
I am not new to ETL and trying to become familiar with Talend. I cannot seem to get any output of a stored procedure (using tMSSqlSP) or a query (using tMSSqlRow). NOTE: Things I read indicated that tMSSqlRow doesn't produce columnar output but not sure that is correct.
The job shown below runs but no output comes from the tMSSqlSP component. The trace debug shows that the output title is null. However, manual execution of the SP in SSMS succeeds, showing both objid and title.
The SP performs a simple query accepting a single input parameter (int) and outputs two columns -- the objid (int) and the title (string):
create procedure st_sp_case_title_get
@objid int
as
select [objid], [title] from [dbo].[table_case] where [objid] = @objid
Upvotes: 0
Views: 1633
Reputation: 4061
You need to use tParseRecordSet
in order to retrieve and parse result sets from tMSSqlRow
and tMSSqlSP
:
Define a column to be your result set (mine is called result
) of type Object
, in addition to your input columns (my input param is personid). In tMSSqlSP
parameters tab, set personid
as type IN
, and result
to be of type RECORD SET
.
tParseRecordSet
schema :
It parses the result column and gets Firstname
and Lastname
columns (your objid
, and title
columns)
tMSSqlRow
is very similar. Check my previous answer here for an example.
Upvotes: 2