<?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: Using global variable in a joblet in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-global-variable-in-a-joblet/m-p/2261153#M42010</link>
    <description>Hi &amp;nbsp; 
&lt;BR /&gt;I think you can use the global variable like this&amp;nbsp;((Integer)globalMap.get("tHiveInput_"+context.current_component_number+"_NB_LINE")) in the joblet, you need to know how many tHiveInput components are used in each job. To get the number of tHiveinput components, read the jobName_0.1.item file which is located in &amp;lt;studio install dir&amp;gt;/workspace/projectName/process/, and then, iterate each number and populate the global variable ((Integer)globalMap.get("tHiveInput_"+context.current_component_number+"_NB_LINE")). 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 14 Oct 2016 04:53:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-14T04:53:52Z</dc:date>
    <item>
      <title>Using global variable in a joblet</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-global-variable-in-a-joblet/m-p/2261152#M42009</link>
      <description>Hi, 
&lt;BR /&gt;If I want to change the job name per job level instead of 'view' -&amp;gt; 'Label Format', how I can achieve this? 
&lt;BR /&gt;Here I am giving example of tHiveInput, but I have another components from where I want record count. 
&lt;BR /&gt;Here is my problem. I have lot many jobs(100-200) and e.g. tHiveInput component is main driving input, so in some job name is like tHiveInput_1, somewhere it is tHiveInput_&amp;lt;some_number&amp;gt; and I want record count for input and output too. 
&lt;BR /&gt;I have one post job joblet, so I was thinking to apply that logic in joblet so everywhere it will get reflected instead of manually updating 200 jobs. If only one component then I can use 'tHiveInput_1_NB_LINE' but name is not constant in all over the jobs. 
&lt;BR /&gt;how I can achieve this problem? 
&lt;BR /&gt;&amp;nbsp;</description>
      <pubDate>Thu, 13 Oct 2016 18:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-global-variable-in-a-joblet/m-p/2261152#M42009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-13T18:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using global variable in a joblet</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-global-variable-in-a-joblet/m-p/2261153#M42010</link>
      <description>Hi &amp;nbsp; 
&lt;BR /&gt;I think you can use the global variable like this&amp;nbsp;((Integer)globalMap.get("tHiveInput_"+context.current_component_number+"_NB_LINE")) in the joblet, you need to know how many tHiveInput components are used in each job. To get the number of tHiveinput components, read the jobName_0.1.item file which is located in &amp;lt;studio install dir&amp;gt;/workspace/projectName/process/, and then, iterate each number and populate the global variable ((Integer)globalMap.get("tHiveInput_"+context.current_component_number+"_NB_LINE")). 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 14 Oct 2016 04:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-global-variable-in-a-joblet/m-p/2261153#M42010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-14T04:53:52Z</dc:date>
    </item>
  </channel>
</rss>

