<?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: getting root_pid in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366268#M129774</link>
    <description>it works and it was easy to think too 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;thank you very much!</description>
    <pubDate>Tue, 15 May 2012 09:31:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-15T09:31:14Z</dc:date>
    <item>
      <title>getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366264#M129770</link>
      <description>Hello, &lt;BR /&gt;I saw in the tStatCatcher that Talend creates a pid for each job executing.&lt;BR /&gt;If I have a job which calls some subjobs, pid are of 3 kinds:&lt;BR /&gt;- pid&lt;BR /&gt;- father_pid&lt;BR /&gt;- root_pid&lt;BR /&gt;I need, from every subjob to get the root_pid cause I need to put it in some tMaps.&lt;BR /&gt;Is it possible?&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Mon, 14 May 2012 16:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366264#M129770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T16:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366265#M129771</link>
      <description>Hi&lt;BR /&gt;The root_pids of the main job and subjobs are the same. It is the pid of main job.&lt;BR /&gt;Or I misunderstand what you mean?&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 15 May 2012 02:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366265#M129771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T02:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366266#M129772</link>
      <description>This is a tStatCatcher line for one subjob: 
&lt;BR /&gt;2012-05-14 18:52:57|qTZYuj|gsFcBS|gsFcBS|15376|&amp;lt;Job_Name&amp;gt;|&amp;lt;Subjob_Name&amp;gt;|_gdIUwJp3EeGVbY8mRw3pmg|0.1|Default||end|success|12546 
&lt;BR /&gt;I noted the the 3rd,4rd and the 5th code are different because are referred to: 
&lt;BR /&gt;- the pid of the current subjob executing 
&lt;BR /&gt;- the pid of the father who called the subjob which is executing 
&lt;BR /&gt;- the pid of the root job (the main job) 
&lt;BR /&gt;I want the root job (the fifth code). 
&lt;BR /&gt;I saw I can get the 3rd code by using the variable "pid". 
&lt;BR /&gt;Is there a way to get the root_pid code? 
&lt;BR /&gt;I hope to have been clear. 
&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 15 May 2012 08:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366266#M129772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T08:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366267#M129773</link>
      <description>Hi&lt;BR /&gt;Got you.&lt;BR /&gt;You can link tStatCatcher with tJavaRow. And save root_pid into a context variable.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 15 May 2012 08:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366267#M129773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T08:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366268#M129774</link>
      <description>it works and it was easy to think too 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;thank you very much!</description>
      <pubDate>Tue, 15 May 2012 09:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366268#M129774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T09:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366269#M129775</link>
      <description>You can use pid public vars of your job:&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; this.pid&lt;BR /&gt;&amp;nbsp; &amp;nbsp; this.fatherPid&lt;BR /&gt;&amp;nbsp; &amp;nbsp; this.rootPid&lt;BR /&gt;and assign to tMap columns</description>
      <pubDate>Tue, 10 Feb 2015 09:01:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366269#M129775</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-02-10T09:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366270#M129776</link>
      <description>I just want to know that root pid is always unique ..its means in every instance can talend generate unique root pid.&lt;BR /&gt;I want to add job id in my job but i'm not getting any variable for that in Talend.</description>
      <pubDate>Thu, 04 Jun 2015 14:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366270#M129776</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-06-04T14:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366271#M129777</link>
      <description>&lt;P&gt;In which way I can do it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have linked tStatLogCatcher to tJava. In tJava I have: context.pid = input_row.pid, but id does not work&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366271#M129777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-27T11:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366272#M129778</link>
      <description>&lt;P&gt;This looks like it is getting a bit obfuscated. The pids are very simple. They are also available in ALL jobs. Lets look at a basic job. A single level job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you add a tJava in a simple job with the following code....&lt;/P&gt;&lt;PRE&gt;System.out.println(pid);
System.out.println(fatherPid);
System.out.println(rootPid);&lt;/PRE&gt;&lt;P&gt;....they will all print the same thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say you have a parent job and a child job. Add the same code in the child job and the rootPid and fatherPid will have the same output, the pid will be different. The pid corresponds to the process id of the actual job that is running. The fatherPid corresponds to the job containing the job that is running. The rootPid corresponds to the top level job that is running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Top level Job (pid=1234)&lt;BR /&gt;|&lt;/P&gt;&lt;P&gt;Second level Job (pid=5678)&lt;/P&gt;&lt;P&gt;|&lt;/P&gt;&lt;P&gt;Third level Job (pid=abcd)&lt;/P&gt;&lt;P&gt;|&lt;/P&gt;&lt;P&gt;Fourth level Job (pid = efgh)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Top level Job's pid = 1234, its fatherPid = 1234 and its rootPid is 1234&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second level Job's pid = 5678, its fatherPid = 1234 and its rootPid is 1234&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Third&amp;nbsp;level Job's pid =&amp;nbsp;abcd, its fatherPid = 5678 and its rootPid is 1234&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Fourth&amp;nbsp;level Job's pid = efgh, its fatherPid =&amp;nbsp;abcd and its rootPid is 1234&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can access the pid, fatherPid and rootPid easily just by using those variables in all jobs.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:18:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366272#M129778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-27T14:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366273#M129779</link>
      <description>&lt;P&gt;Thank you very much for the explanation! Truly helpul!!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366273#M129779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-27T14:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: getting root_pid</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366274#M129780</link>
      <description>&lt;P&gt;You can use pid public vars of your job :&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;this.pid
this.fatherPid
this.rootPid&lt;/PRE&gt;
&lt;P&gt;and use it in tjava or assign to tMap columns ...&lt;/P&gt;
&lt;P&gt;It works with&amp;nbsp;Talend 6 at least.&lt;BR /&gt;(thanks to jordimorato)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS : I found all this variables who could be utiles :&lt;/P&gt;
&lt;PRE&gt;this.jobName&lt;BR /&gt;this.jobVersion&lt;BR /&gt;this.projectName&lt;BR /&gt;this.contextStr&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 17:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-root-pid/m-p/2366274#M129780</guid>
      <dc:creator>vincentB1</dc:creator>
      <dc:date>2018-10-15T17:03:55Z</dc:date>
    </item>
  </channel>
</rss>

