AdvApp
AdvApp

Reputation: 1170

Why no output from Talend tMSSqlSP or tMSSqlRow

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   

traceschemaoutput

Upvotes: 0

Views: 1633

Answers (1)

Ibrahim Mezouar
Ibrahim Mezouar

Reputation: 4061

You need to use tParseRecordSet in order to retrieve and parse result sets from tMSSqlRow and tMSSqlSP :

enter image description here

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 :

enter image description here

It parses the result column and gets Firstname and Lastname columns (your objid, and title columns)

enter image description here

tMSSqlRow is very similar. Check my previous answer here for an example.

Upvotes: 2

Related Questions