<?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: Global Variables using the tSetGlobalVar component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279020#M54315</link>
    <description>That is because the globalMap value is null. You need to do a check for null value and not try to convert it to a Double if it is null</description>
    <pubDate>Tue, 20 Sep 2016 12:54:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-20T12:54:11Z</dc:date>
    <item>
      <title>Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279015#M54310</link>
      <description>I have lookup file about 400 records and wanted to use the all rows as a global variables wherever needed to use them in transformation(in tMap component).&lt;BR /&gt;Is there any way to store the all lookup values in tSetGlobalVar component without typing each and every row(key &amp;amp; value) ? please help me in this case.&lt;BR /&gt;Thanks in advance !&lt;BR /&gt;Kyle</description>
      <pubDate>Mon, 19 Sep 2016 15:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279015#M54310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T15:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279016#M54311</link>
      <description>Hello 
&lt;BR /&gt;You might need tFlowToIterate component, this component is used to iterate each row and put each column to global variable, so you can access the value of one column like&amp;nbsp; 
&lt;BR /&gt;(String)globalMap.get("row1.columnName") 
&lt;BR /&gt;Please describe your requirement with more details, so we can give you more accurate answers. 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 19 Sep 2016 16:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279016#M54311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T16:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279017#M54312</link>
      <description>Thank you Shong !! 
&lt;BR /&gt;I have input data as in column level and lookup as in row level, need to join both and get the respective Average to populate output. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;B&gt;Input:&lt;/B&gt; 
&lt;BR /&gt;ID &amp;nbsp; &amp;nbsp; &amp;nbsp;C1 &amp;nbsp;C2 C3 C4 C5 C6&amp;nbsp; 
&lt;BR /&gt;X123 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 1 &amp;nbsp; 0 &amp;nbsp; 1 &amp;nbsp; 1 &amp;nbsp; 0 
&lt;BR /&gt;B456 &amp;nbsp; &amp;nbsp;1 &amp;nbsp; 0 &amp;nbsp; 1 &amp;nbsp; 0 &amp;nbsp; 0 &amp;nbsp; 0 
&lt;BR /&gt; 
&lt;B&gt;lookup:&lt;/B&gt; 
&lt;BR /&gt;CODES &amp;nbsp;AVERAGE 
&lt;BR /&gt;C1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.50 
&lt;BR /&gt;C2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.50 
&lt;BR /&gt;C3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.50 
&lt;BR /&gt;C4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4.50 
&lt;BR /&gt;C5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.50 
&lt;BR /&gt;C6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.50 
&lt;BR /&gt;so trying to use the tSetGlobalVar component and keep the all lookup values in it and fetching through globalMap.get as below 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;I&gt;tSetGlobalVar----onsubjobok----&amp;gt; inputfile-----&amp;gt; tmap-----&amp;gt;outputfile.&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;I&gt;in tmap vatiable section placing below statements and getting respective AVERAGE&lt;/I&gt;&lt;BR /&gt;&lt;I&gt;(String)globalMap.get("C1")&lt;BR /&gt;&lt;/I&gt;&lt;I&gt;(String)globalMap.get("C2")&lt;BR /&gt;&lt;/I&gt;&lt;I&gt;(String)globalMap.get("C3") ...etc&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;my question is... in future i will have more data in lookup file about 400 rows, so is there any way to load the all values in tSetGlobalVar compoent (directly read the values from the lookup file and keep them in tSetGlobalVar component to use in downstream compoents) ? 
&lt;BR /&gt;so far, rhall helping me on this case and here is link-&amp;nbsp; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCjEhCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/Join-input-and-lookup-file/td-p/67280&lt;/A&gt; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Kyle</description>
      <pubDate>Mon, 19 Sep 2016 18:22:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279017#M54312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T18:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279018#M54313</link>
      <description>Hello Kyle&amp;nbsp;
&lt;BR /&gt;You can set all the lookup rows to global variable by configuring the tsetGlobalVar as:
&lt;BR /&gt;(tfilelist--iterate--for multiple lookup file)lookup_file---main(row1)---tsetGlobalVar
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;onsubjobok
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;inputfile-----&amp;gt; tmap-----&amp;gt;outputfile.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;on tsetGlobalVar&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;set the key column as: row1.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;CODES, set value column as: row1.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;AVERAGE&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Regards&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Shong&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 20 Sep 2016 02:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279018#M54313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T02:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279019#M54314</link>
      <description>Hi Shong-
&lt;BR /&gt;I followed the same&amp;nbsp;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;using the&amp;nbsp;&lt;/FONT&gt;
&lt;B&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Double.parseDouble((String)globalMap.get("C1"))&lt;/FONT&gt;&lt;/B&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&amp;nbsp;in tMap to get Average of C1&lt;/FONT&gt;&amp;nbsp;but getting&amp;nbsp;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;NullPointerException&amp;nbsp;&lt;/FONT&gt;error
&lt;BR /&gt;lookup_file---main(row1)---tsetGlobalVar (
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;set the key column as: row1.&lt;/FONT&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;CODES, set value column as: row1.&lt;/FONT&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;AVERAGE)&lt;/FONT&gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;onsubjobok
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;inputfile-----&amp;gt; tmap-----&amp;gt;outputfile.&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Please help me if i'm wrong in using the function&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;Exception in component tMap_1
&lt;BR /&gt;java.lang.NullPointerException
&lt;BR /&gt;at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
&lt;BR /&gt;at java.lang.Double.parseDouble(Unknown Source)
&lt;BR /&gt;&amp;nbsp;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Regards&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Kyle&lt;/FONT&gt;</description>
      <pubDate>Tue, 20 Sep 2016 12:51:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279019#M54314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T12:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279020#M54315</link>
      <description>That is because the globalMap value is null. You need to do a check for null value and not try to convert it to a Double if it is null</description>
      <pubDate>Tue, 20 Sep 2016 12:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279020#M54315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T12:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279021#M54316</link>
      <description>Hi rhall..
&lt;BR /&gt;don't have any NULLs in input(lookup) file, i tried with just one record which is not null and still getting the same error
&lt;BR /&gt;Regards,
&lt;BR /&gt;Kyle</description>
      <pubDate>Tue, 20 Sep 2016 13:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279021#M54316</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279022#M54317</link>
      <description>OK. Are you sure that your globalMap variable key is "C1"? Because the globalMap is passing back null for that key. Java is case sensitive.</description>
      <pubDate>Tue, 20 Sep 2016 13:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279022#M54317</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T13:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279023#M54318</link>
      <description>Here is the flow i have.&lt;BR /&gt;lookup_file---main(row1)---tsetGlobalVar (key column as: row1.CODES, value column as: row1.AVERAGE) ... tlogrow&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;onsubjobok&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|&lt;BR /&gt;inputfile-----&amp;gt; tmap-----&amp;gt;outputfile.&lt;BR /&gt;&lt;BR /&gt;I'm able to see correct records as below from the tlogrow output&lt;BR /&gt;row1.CODES &amp;nbsp;row1.AVERAGE&lt;BR /&gt;C1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.50&lt;BR /&gt;C2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.50&lt;BR /&gt;C3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.50&lt;BR /&gt;C4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.50&lt;BR /&gt;C5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.50&lt;BR /&gt;C6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.50&lt;BR /&gt;but when i use the Double.parseDouble((String)globalMap.get("C1")) getting error&lt;BR /&gt;just making sure, when i use Double.parseDouble((String)globalMap.get("row1.CODES")) it's giving me result but it's not useful&lt;BR /&gt;Thanks,&lt;BR /&gt;Kyle</description>
      <pubDate>Tue, 20 Sep 2016 14:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279023#M54318</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T14:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Global Variables using the tSetGlobalVar component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279024#M54319</link>
      <description>Where is&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;globalMap.get("C1") being set? the globalMap is just a HashMap which will only hold what is put in there. You have to put the values in there using Java, a tSetGlobalMap or a tFlowToIterate (other Talend components use it as well). Where is "C1" being add to the globalMap and what is being put in there? For some reason, when you are trying to use the value corresponding to the "C1" key, it is not there.&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Global-Variables-using-the-tSetGlobalVar-component/m-p/2279024#M54319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-20T14:31:01Z</dc:date>
    </item>
  </channel>
</rss>

