<?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: Call Routine from inside Talend Job in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306320#M77877</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Valueafterdecryption=Decrypt_Routine.PassingGlobalVar&lt;BR /&gt;[FATAL]: tgtimdarenew.dd_0_1.dd - tMSSqlConnection_1 Login failed for user 'tgbi_id00'.&lt;BR /&gt;java.sql.SQLException: Login failed for user 'tgbi_id00'.&lt;BR /&gt;at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:632)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.JtdsConnection.&amp;lt;init&amp;gt;(JtdsConnection.java:371)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see the following message when i try to call the assign routine return value to my tsetglobalvar. I set it as Key= "Valueaftedecryption", Value=&amp;nbsp;Decrypt_Routine.PassingGlobalVar and then trying to call the global map variable inside my tmssqlconnection component password =&amp;nbsp;((String)globalMap.get("Valueaftedecryption"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My java routine is:&lt;/P&gt;
&lt;P&gt;--------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;package routines;&lt;/P&gt;
&lt;P&gt;import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;&lt;/P&gt;
&lt;P&gt;public class Decrypt_Routine {&lt;/P&gt;
&lt;P&gt;public static String PassingGlobalVar(java.util.Map&amp;lt;String, Object&amp;gt; globalMap) {&lt;BR /&gt;// TODO Auto-generated method stub&lt;BR /&gt;&lt;BR /&gt;globalMap.put("SQLServer_password", "****************");&lt;BR /&gt;&lt;BR /&gt;System.out.println("myString=" + globalMap.get("SQLServer_password"));&lt;/P&gt;
&lt;P&gt;StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();&lt;BR /&gt;encryptor.setAlgorithm("PBEWithMD5AndDES");&lt;BR /&gt;encryptor.setPassword("***************");&lt;BR /&gt;&lt;BR /&gt;String encryptedValue = "***********************************";&lt;/P&gt;
&lt;P&gt;String decryptedValue = encryptor.decrypt(encryptedValue);&lt;BR /&gt;System.out.println("Decrypted Value is "+decryptedValue);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return decryptedValue;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;class Decryption{&lt;BR /&gt;public static void main(){&lt;BR /&gt;Decrypt_Routine.PassingGlobalVar(null);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;-----------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you see me doing anything wrong&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 16:54:55 GMT</pubDate>
    <dc:creator>desanip</dc:creator>
    <dc:date>2019-06-27T16:54:55Z</dc:date>
    <item>
      <title>Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306314#M77871</link>
      <description>&lt;P&gt;Hello Talendians,&lt;/P&gt;
&lt;P&gt;Can someone explain me How i can call the user routine within my talend job? Is it just&amp;nbsp;&lt;SPAN&gt;&amp;lt;routine_name&amp;gt;.&amp;lt;method_name&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a routine to decrypt my encrypted password. So all i need to do is to use it in my tmssqlconnection password?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306314#M77871</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2024-11-16T05:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306315#M77872</link>
      <description>&lt;P&gt;You got it, in the password field or before the tXxxxxConnection to set a global variable reused for the password&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 18:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306315#M77872</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-06-26T18:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306316#M77873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLrIAAW"&gt;@desanip&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before the connection component, set the password in a context as context.password = yourDecryptRoutine(enCryptedpassword) and use the context in Connection component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Subhadip&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 19:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306316#M77873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-26T19:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306317#M77874</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPZoAAO"&gt;@subhadip13&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;Thanks for the insights guys.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am attaching a screenshot of the workflow and the routine i am using. I have saved the varible in a tsetglobalvar and was able to print it. I sent the variable( Which is basically a encrypted string) to my routine and i have decrypted it using a java algorithm.&lt;/P&gt; 
&lt;P&gt;So i am trying to put the decrypted password in tmssqlconnection.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How i do i store the return value from java routine in talend?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When i call my routine, the connection component is throwing an error.&lt;/P&gt; 
&lt;P&gt;Let me know if what i have done looks correct.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lvbq"&gt;2019-06-26_12-55-24.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvUT"&gt;error.PNG&lt;/A&gt;</description>
      <pubDate>Wed, 26 Jun 2019 19:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306317#M77874</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2019-06-26T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306318#M77875</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLrIAAW"&gt;@desanip&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned earlier you can store the result of the decryption to a context and use the context in your connection component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Subhadip&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 21:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306318#M77875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-26T21:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306319#M77876</link>
      <description>Share the error message</description>
      <pubDate>Wed, 26 Jun 2019 22:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306319#M77876</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-06-26T22:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306320#M77877</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Valueafterdecryption=Decrypt_Routine.PassingGlobalVar&lt;BR /&gt;[FATAL]: tgtimdarenew.dd_0_1.dd - tMSSqlConnection_1 Login failed for user 'tgbi_id00'.&lt;BR /&gt;java.sql.SQLException: Login failed for user 'tgbi_id00'.&lt;BR /&gt;at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:632)&lt;BR /&gt;at net.sourceforge.jtds.jdbc.JtdsConnection.&amp;lt;init&amp;gt;(JtdsConnection.java:371)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see the following message when i try to call the assign routine return value to my tsetglobalvar. I set it as Key= "Valueaftedecryption", Value=&amp;nbsp;Decrypt_Routine.PassingGlobalVar and then trying to call the global map variable inside my tmssqlconnection component password =&amp;nbsp;((String)globalMap.get("Valueaftedecryption"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My java routine is:&lt;/P&gt;
&lt;P&gt;--------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;package routines;&lt;/P&gt;
&lt;P&gt;import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;&lt;/P&gt;
&lt;P&gt;public class Decrypt_Routine {&lt;/P&gt;
&lt;P&gt;public static String PassingGlobalVar(java.util.Map&amp;lt;String, Object&amp;gt; globalMap) {&lt;BR /&gt;// TODO Auto-generated method stub&lt;BR /&gt;&lt;BR /&gt;globalMap.put("SQLServer_password", "****************");&lt;BR /&gt;&lt;BR /&gt;System.out.println("myString=" + globalMap.get("SQLServer_password"));&lt;/P&gt;
&lt;P&gt;StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();&lt;BR /&gt;encryptor.setAlgorithm("PBEWithMD5AndDES");&lt;BR /&gt;encryptor.setPassword("***************");&lt;BR /&gt;&lt;BR /&gt;String encryptedValue = "***********************************";&lt;/P&gt;
&lt;P&gt;String decryptedValue = encryptor.decrypt(encryptedValue);&lt;BR /&gt;System.out.println("Decrypted Value is "+decryptedValue);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return decryptedValue;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;class Decryption{&lt;BR /&gt;public static void main(){&lt;BR /&gt;Decrypt_Routine.PassingGlobalVar(null);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;-----------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you see me doing anything wrong&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 16:54:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306320#M77877</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2019-06-27T16:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306321#M77878</link>
      <description>&lt;P&gt;Did you check the value of the "Valueafterdecryption" global variable?&lt;/P&gt; 
&lt;P&gt;Also, the method&amp;nbsp;&lt;SPAN&gt;PassingGlobalVar should have a simple string as the parameter, for example encryptedPassword.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;This way, you can call the method with the following expression:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;Decrypt_Routine.PassingGlobalVar((String)globalMap.get("SQLServer_password"))&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Finally, the routine should be defined as a single Java class, 1 for encryption (parameter = clear password) and 1 for decryption (parameter = encrypted password).&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 17:43:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306321#M77878</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-06-27T17:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306322#M77879</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,
&lt;BR /&gt;
&lt;BR /&gt;I did and it was returning the string "Decrypt_Routine.PassingGlobalVar" which is incorrect. I needed the return value of the decrypyed string. Clearly the classname.routinename call is not working.</description>
      <pubDate>Thu, 27 Jun 2019 17:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306322#M77879</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2019-06-27T17:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Call Routine from inside Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306323#M77880</link>
      <description>&lt;P&gt;I've just completed my previous post&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Call-Routine-from-inside-Talend-Job/m-p/2306323#M77880</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-06-27T18:00:41Z</dc:date>
    </item>
  </channel>
</rss>

