<?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: Creating a globally accessible HashMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197228#M1055</link>
    <description>Use a routine with a ConcurrentHashMap (&lt;A href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html&lt;/A&gt;)</description>
    <pubDate>Wed, 25 Jan 2017 13:11:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-25T13:11:41Z</dc:date>
    <item>
      <title>Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197227#M1054</link>
      <description>Hi, first off I know about globalMap and context 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;For various reasons I would like the option of loading up some re-usable lookup tables at the start of my job and then referencing them in code (tJavaRow etc) across subjobs. Is there a way to create variables in the scope of the TalendJob class just like globalMap? I know I could store everything in globalMap with some sensible key definition but it doesn't feel appropriate to do so and obviously I don't really want to build my own HashMap and then store /that/ in the globalMap either ... 
&lt;BR /&gt;TIA, Mark</description>
      <pubDate>Wed, 25 Jan 2017 13:08:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197227#M1054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T13:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197228#M1055</link>
      <description>Use a routine with a ConcurrentHashMap (&lt;A href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html&lt;/A&gt;)</description>
      <pubDate>Wed, 25 Jan 2017 13:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197228#M1055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197229#M1056</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Use a routine with a ConcurrentHashMap (&lt;A href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html&lt;/A&gt;)&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;OK but if I do that say, at the first block of a tJavaFlex, it will be within the scope of the enclosing subjob and I want to be able to reference it directly from components in subsequent subjobs so I'm not quite sure how that needs to be declared to have the visibility I need?
&lt;BR /&gt;Ta, Mark</description>
      <pubDate>Wed, 25 Jan 2017 13:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197229#M1056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T13:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197230#M1057</link>
      <description>OK - I have this working - create the HashMap and then store its reference in the globalMap - works well and should simplify some stuff that would otherwise require tMaps and redundant queries.</description>
      <pubDate>Wed, 25 Jan 2017 13:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197230#M1057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T13:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197231#M1058</link>
      <description>You answered your own question before I saw it. That is how I deal with some of my lookups to make them a little more straight forward &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197231#M1058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T14:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197232#M1059</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp; can you elaborate a little and maybe give some example?&lt;/P&gt; 
&lt;P&gt;I would like to have set of variables, set their values in one job according to table (var_name, var_val) and later be able to use that variables in run if conditions and filters for outputs in many other jobs. Looks like that HashMap can be a solution for me, but I found only this article&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/i6eFKBuNsRD2KzBCYnXHhw/4jPcdaVw7eaDvMyLDjdYfQ" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/i6eFKBuNsRD2KzBCYnXHhw/4jPcdaVw7eaDvMyLDjdYfQ&lt;/A&gt; , and if I understand this correctly setValue/getValue functions in tJavaRow set/get value statically only for one variable so it wont work in my case if I have 100+ variables&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197232#M1059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T12:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a globally accessible HashMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197233#M1060</link>
      <description>&lt;P&gt;When you say you want to use the values that have been set in RunIfs and filters in many other jobs, do you mean child jobs of the job that you are setting the values in? This is important since these will all run under the same process. They are essentially running in a single Java application. If that is the case, then this will work for you. Otherwise, you will need a different solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming your requirement is for jobs running in the same process, this page goes through an example using a ConcurrentHashMap (&lt;A href="https://www.talendbyexample.com/talend-returning-values-from-subjobs.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.talendbyexample.com/talend-returning-values-from-subjobs.html&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 16:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-globally-accessible-HashMap/m-p/2197233#M1060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T16:15:48Z</dc:date>
    </item>
  </channel>
</rss>

