<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to capture raiseerror warnings from mssql stored procedure in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276615#M52644</link>
    <description>&lt;P&gt;Thanks nikhil.&amp;nbsp; I am already using isFunction and get the return value.&amp;nbsp; The issue is how to get the RaiseError message from SP.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 14:31:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-20T14:31:20Z</dc:date>
    <item>
      <title>How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276613#M52642</link>
      <description>&lt;P&gt;I am using tDBSP to call MS SQL stored procedure.&amp;nbsp; I can get the Out parameters, resultset parameters and&amp;nbsp;'@RETURN_VALUE from the SP but I could not get the raiseError exception thrown from SP.&amp;nbsp; &amp;nbsp;I have tried the below options to capture the exception in the job but I could not.&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;1. globalMap.get(&lt;/SPAN&gt;"tDBSP_1_ERROR_MESSAGE"&lt;SPAN class="s1"&gt;) . - Returning null&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;2. tAssertCatcher/tLogCatcher&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;POC Store procedure&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;BEGIN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;DECLARE&lt;/STRONG&gt;&lt;/SPAN&gt; @ErrMsg NVARCHAR(4000) ,@ErrSeverity &lt;SPAN class="s1"&gt;&lt;STRONG&gt;INT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;@ErrMsg &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;SPAN class="s2"&gt;'Test Error'&lt;/SPAN&gt; , @ErrSeverity &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;-&lt;/STRONG&gt;1&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RAISERROR&lt;/STRONG&gt;&lt;/SPAN&gt;(@ErrMsg, @ErrSeverity, 1)&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;END&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;Please see the attached screen shot from DB Visualizer when I try to execute the SP directly.&amp;nbsp; Is there any way i can capture the Warning&amp;nbsp; in Talend.&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-02-19 at 4.48.23 PM.png" style="width: 848px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M34j.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133678i02C5D547EBD6671B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M34j.png" alt="0683p000009M34j.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 21:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276613#M52642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-19T21:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276614#M52643</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Could you please try to use it as function where you can capture the error value inside SP itself and send them as a return value with a specific return code (say -3 instead of normal return value of 0)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Du.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146590i9EAF94184E4C927B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Du.png" alt="0683p000009M3Du.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 08:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276614#M52643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T08:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276615#M52644</link>
      <description>&lt;P&gt;Thanks nikhil.&amp;nbsp; I am already using isFunction and get the return value.&amp;nbsp; The issue is how to get the RaiseError message from SP.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 14:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276615#M52644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276616#M52645</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Could you please try below method where you are passing the data to an output variable and send it to a tFlowtoIterate.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Fg.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132667i09A00191FB7EF812/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Fg.png" alt="0683p000009M3Fg.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then you can verify whether the status is not equal to 0 by a Run if condition.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 873px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Fl.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150174iBDCF369E11471095/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Fl.png" alt="0683p000009M3Fl.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I dont have a MSSQL server handy with me. So I could not personally test it. But I believe this flow in its exact form or with minor modifications should work fine.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Could you please try it out and let me know the results?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 15:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276616#M52645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T15:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276617#M52646</link>
      <description>&lt;P&gt;Thanks Nikhil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have the same steps to get the return value using 'Is Function'&amp;nbsp; and verify the SP is returning 0 or something else.&amp;nbsp; The tFlowIterate doesnt help with the&lt;/P&gt;&lt;P class="p1"&gt;RAISERROR&amp;nbsp;messages from Stored Procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 20:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276617#M52646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T20:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276618#M52647</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Are you using Try catch block in the Stored Procedure so that any error can be caught within Stored Procedure itself and can be converted to appropriate return values?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/try-catch-transact-sql?view=sql-server-2017" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.microsoft.com/en-us/sql/t-sql/language-elements/try-catch-transact-sql?view=sql-server-2017&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Once you are handling the error messages within Stored Proecedure and converting them to proper return values, my understanding is that you will be able to manage them using tFlowtoIterate as shown above.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 03:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276618#M52647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-21T03:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276619#M52648</link>
      <description>&lt;P&gt;Yes Nikhil. I am using try ... catch block in the Stored Procedures with user defined error message. (&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Are you using Try catch block in the Stored Procedure so that any error can be caught within Stored Procedure itself and can be converted to appropriate return values?)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Talend I am trying to get the User defined Error Message and store it in the log and another error table.&amp;nbsp; &amp;nbsp; But not sure how to get the RAISERROR messages in tDBSP.&amp;nbsp; I have tried the OUT/RECORD SET type but getting error saying invalid column name .&amp;nbsp; &amp;nbsp; I am already getting the returnvalue (that is not an issue).&amp;nbsp; &amp;nbsp;Based on the return value i can handle further steps for SP success/failure steps .&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;tFlowtoIterate doesnt help to get the RAISERROR messages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the raiseerror doc:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-2017" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-2017&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276619#M52648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-21T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture raiseerror warnings from mssql stored procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276620#M52649</link>
      <description>&lt;P&gt;The tlogcatcher get the RAISEERROR exception message from SP.&amp;nbsp; Incase any one looking for the solution.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 21:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-raiseerror-warnings-from-mssql-stored-procedure/m-p/2276620#M52649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-21T21:46:31Z</dc:date>
    </item>
  </channel>
</rss>

