<?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 GlobalMap visibility in Routines in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266532#M45722</link>
    <description>Hi, 
&lt;BR /&gt;I made a class string OracleFunc (String conn, string param1, string param2) in a new routine to encapsulate a Oracle PLSQL function. I need this function in a tMap, that's why I don't want to use the component tOracleSP. 
&lt;BR /&gt;At the begining of the job, before my tOracleInput, I open a connection with a tOracleConnect, and I would like to re-use this connection in my class instead of opening a new hard-coded connection at each call of the function. 
&lt;BR /&gt;Apparently the connection defined at the beginning of the job is stored in the GlobalMap in the Job main class. 
&lt;BR /&gt;So let's imagine a class looking like that : 
&lt;BR /&gt;public static String Oracle_func (String conn, String parm1, String parm2) { 
&lt;BR /&gt; 
&lt;BR /&gt; java.sql.Connection myConn = null; 
&lt;BR /&gt; 
&lt;BR /&gt; myConn = (java.sql.Connection) globalMap.get("conn_ " + conn); 
&lt;BR /&gt; java.sql.CallableStatement statement = myConn.prepareCall("{? = call myPackage.myFunc(? ?)}"); 
&lt;BR /&gt; statement.registerOutParameter(1, java.sql.Types.VARCHAR); 
&lt;BR /&gt; statement.setString(1, parm1); 
&lt;BR /&gt; statement.setString(2, parm2); 
&lt;BR /&gt; statement.execute(); 
&lt;BR /&gt; result = statement.getString(1); 
&lt;BR /&gt; 
&lt;BR /&gt; } 
&lt;BR /&gt;the GlobalMap is not resolved, what sould I do to see it it from my class ? 
&lt;BR /&gt;I'm beginner with java, if my question is not clear, please, feel free to ask for more details. 
&lt;BR /&gt;Thanks for your attention, 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Sylvain</description>
    <pubDate>Sat, 16 Nov 2024 14:21:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T14:21:27Z</dc:date>
    <item>
      <title>GlobalMap visibility in Routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266532#M45722</link>
      <description>Hi, 
&lt;BR /&gt;I made a class string OracleFunc (String conn, string param1, string param2) in a new routine to encapsulate a Oracle PLSQL function. I need this function in a tMap, that's why I don't want to use the component tOracleSP. 
&lt;BR /&gt;At the begining of the job, before my tOracleInput, I open a connection with a tOracleConnect, and I would like to re-use this connection in my class instead of opening a new hard-coded connection at each call of the function. 
&lt;BR /&gt;Apparently the connection defined at the beginning of the job is stored in the GlobalMap in the Job main class. 
&lt;BR /&gt;So let's imagine a class looking like that : 
&lt;BR /&gt;public static String Oracle_func (String conn, String parm1, String parm2) { 
&lt;BR /&gt; 
&lt;BR /&gt; java.sql.Connection myConn = null; 
&lt;BR /&gt; 
&lt;BR /&gt; myConn = (java.sql.Connection) globalMap.get("conn_ " + conn); 
&lt;BR /&gt; java.sql.CallableStatement statement = myConn.prepareCall("{? = call myPackage.myFunc(? ?)}"); 
&lt;BR /&gt; statement.registerOutParameter(1, java.sql.Types.VARCHAR); 
&lt;BR /&gt; statement.setString(1, parm1); 
&lt;BR /&gt; statement.setString(2, parm2); 
&lt;BR /&gt; statement.execute(); 
&lt;BR /&gt; result = statement.getString(1); 
&lt;BR /&gt; 
&lt;BR /&gt; } 
&lt;BR /&gt;the GlobalMap is not resolved, what sould I do to see it it from my class ? 
&lt;BR /&gt;I'm beginner with java, if my question is not clear, please, feel free to ask for more details. 
&lt;BR /&gt;Thanks for your attention, 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Sylvain</description>
      <pubDate>Sat, 16 Nov 2024 14:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266532#M45722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: GlobalMap visibility in Routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266533#M45723</link>
      <description>Hello, 
&lt;BR /&gt;The globalMap is not accessible from the routine (these are 2 independant units).
&lt;BR /&gt;You may pass the globalMap as a parameter of your routine.
&lt;BR /&gt;HTH,</description>
      <pubDate>Tue, 27 May 2008 23:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266533#M45723</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-27T23:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: GlobalMap visibility in Routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266534#M45724</link>
      <description>OK, I pass the (java.sql.Connection) globalMap.get("conn_myconnection") in parameter to my function and it works perfectly ! 
&lt;BR /&gt;thanks a lot !</description>
      <pubDate>Thu, 29 May 2008 16:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266534#M45724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-29T16:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: GlobalMap visibility in Routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266535#M45725</link>
      <description>Hello, 
&lt;BR /&gt;Can you tell me How to pass globalMap as parameter to Routine from tJava??? 
&lt;BR /&gt;Is it possible?? 
&lt;BR /&gt;or how do i make the statement&amp;nbsp; 
&lt;BR /&gt;"String filename = ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) ; " 
&lt;BR /&gt;working in a routine. Because i read globalMap can't be used in Routine.</description>
      <pubDate>Sat, 19 Dec 2015 18:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/GlobalMap-visibility-in-Routines/m-p/2266535#M45725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-19T18:36:40Z</dc:date>
    </item>
  </channel>
</rss>

