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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calling SP and show its result to tlogrow

I am trying to show my SP result to tlogrow component

 

For this i have joined tDBSP and Select Mysql Server and configure it for my SP in the database 

Then i joined this component to tlogrow component but empty result 

Is there anyway to do it? 

0683p000009M6pU.png

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello @sm

 

What kind of result your Stored Procedure returns in Database when Stored Procedure is executed there?

 

Example, If your stored procedure prints the result of a table as output OR  If Stored Procedure prints its end result which is captured in a local variable.

 

If your scenario is as per the above example, then 

 

In your Stored Procedure, whichever result you want to pass to Talend add an alias name to it -> 

SELECT @Result AS PasstoTalend  -- where @Result is your local variable which stores result that you want to pass to Talend

 

OR

 

SELECT Column-Name AS PasstoTalend FROM Table-Name

 

 

In Talend Job instead of using tMSSQLSP use tMSSQLInput and in Query tab  -> call your Stored Procedure  (Exec .... ) and in Edit schema add -> PasstoTalend as string type column.

 

Connect tMSSQLInput to tLogRow and see if the expected result is printed.

 

You can also try the above approach using your existing tMSSQLSP -> tLogRow 

In my case, tMSSQLInput had worked. So you can use any of them. What's important is adding alias name of the column which you have specified in your Stored procedure i.e. PasstoTalend to the Edit schema.

 

View solution in original post

8 Replies
rmartin2
Creator II
Creator II

Hi !

 

I don't have the content of your stored procedure, but I think the main problem is that output of SP is for the client, not for Talend.

You need to redirect it to a file or if possible (not used to it) to standard output (screen).

 

Hope it helps 0683p000009MACn.png

Anonymous
Not applicable
Author

Hi,

 

    Could you please refer the sample scenario given in the below link and try to setup on similar lines? Please verify whether you have selected IsFunction option in your component and mapped the data to output column.

 

https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/HOP2YjpwNwtjy3I8LOv_ow

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

Do i need a separate input connection for the table with select query ?

Even tough my SP is using same Select query

Anonymous
Not applicable
Author

Hi @sm 

 

If the data is coming from SP component, then you do not need to use the input component separately. It depends on how you are orchestrating the flow.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

0683p000009M6po.pngI did not check the Isfunction , should i do this ?

Anonymous
Not applicable
Author

Hi,

 

   If you have to transfer data between Stored proc and Talend schema, you will have to use it.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

Hi

But still it gives me empty drop down in the Return Result in

Anonymous
Not applicable
Author

Hello @sm

 

What kind of result your Stored Procedure returns in Database when Stored Procedure is executed there?

 

Example, If your stored procedure prints the result of a table as output OR  If Stored Procedure prints its end result which is captured in a local variable.

 

If your scenario is as per the above example, then 

 

In your Stored Procedure, whichever result you want to pass to Talend add an alias name to it -> 

SELECT @Result AS PasstoTalend  -- where @Result is your local variable which stores result that you want to pass to Talend

 

OR

 

SELECT Column-Name AS PasstoTalend FROM Table-Name

 

 

In Talend Job instead of using tMSSQLSP use tMSSQLInput and in Query tab  -> call your Stored Procedure  (Exec .... ) and in Edit schema add -> PasstoTalend as string type column.

 

Connect tMSSQLInput to tLogRow and see if the expected result is printed.

 

You can also try the above approach using your existing tMSSQLSP -> tLogRow 

In my case, tMSSQLInput had worked. So you can use any of them. What's important is adding alias name of the column which you have specified in your Stored procedure i.e. PasstoTalend to the Edit schema.