<?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: tfixedflowinput and trunjob in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300486#M72711</link>
    <description>Hi,
&lt;BR /&gt;I don't know if i have rightly understood your problem but here is what I suggest. Instead of using a subjob to do your agregation, you may be shall use the tjavarow component with something like this. output_row.newColumn+=input_row.newColumn;
&lt;BR /&gt;Could you give a screenshot of your job?</description>
    <pubDate>Mon, 30 Jan 2012 16:14:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-01-30T16:14:25Z</dc:date>
    <item>
      <title>tfixedflowinput and trunjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300485#M72710</link>
      <description>Hi, 
&lt;BR /&gt;I am trying to create job with a child job as follows: 
&lt;BR /&gt;Parent job 
&lt;BR /&gt;====== 
&lt;BR /&gt;tDBInput1 (read a table) 
&lt;BR /&gt;- iterate (to each of the following) 
&lt;BR /&gt; - tDBInput2 (perform a count based on each record from tDBInput1 and output count) 
&lt;BR /&gt; - tDBInput3 (if tDBInput2 count = 0, perform a different count based on each record from tDBInput1 and output count) 
&lt;BR /&gt;if tDBInput2 count &amp;gt; 0 then fetch records from table1 -&amp;gt; tRunJob (child job) 
&lt;BR /&gt;if tDBInput3 count &amp;gt; 0 then fetch records from table2 -&amp;gt; tRunJob (child job) 
&lt;BR /&gt;the schema of table1 and table2 fetch is the same 
&lt;BR /&gt;records from table1/table2 is then fed into the child job which performs some aggregation 
&lt;BR /&gt;Child job 
&lt;BR /&gt;===== 
&lt;BR /&gt;tFixedFlowInput -&amp;gt; tAggregateRow -&amp;gt; tLogRow 
&lt;BR /&gt;To achieve the above, I created a child job with tFixedFlowInput which takes in the context parameter 
&lt;BR /&gt;The parent job then has tRunJob which passes the rows from tDBInput2/tDBInput3 to tRunJob. 
&lt;BR /&gt;The context parameter is string/double/long. Perhaps object will work but I am not sure how to set it up. 
&lt;BR /&gt;My job seems to work but then I realised that the child job is executed for each row which gave me the wrong answer. The aggregation in child job needs to take in entire records from tDBInput2/tDBInput3, otherwise the aggregation is incorrect. 
&lt;BR /&gt;My question is: 
&lt;BR /&gt;Is there a way to configure/pass into the child job all the records before the child job runs? 
&lt;BR /&gt;Is there an example to show how to setup object context (at the moment, I have to create context parameters for each of the field)? 
&lt;BR /&gt;Thank in advance.</description>
      <pubDate>Sat, 16 Nov 2024 12:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300485#M72710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: tfixedflowinput and trunjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300486#M72711</link>
      <description>Hi,
&lt;BR /&gt;I don't know if i have rightly understood your problem but here is what I suggest. Instead of using a subjob to do your agregation, you may be shall use the tjavarow component with something like this. output_row.newColumn+=input_row.newColumn;
&lt;BR /&gt;Could you give a screenshot of your job?</description>
      <pubDate>Mon, 30 Jan 2012 16:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300486#M72711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T16:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: tfixedflowinput and trunjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300487#M72712</link>
      <description>My simplified example is attached. I used tFlowToIterate_1 and tFileInputDelimited_3 to emulate the iterate that I have on database. Note: Table1 and Table2 have the same out schema but the real table has different schemas.
&lt;BR /&gt;tFileInputDelimited_1 input is 
&lt;BR /&gt;ID,Type
&lt;BR /&gt;A1,T1
&lt;BR /&gt;A1,T2
&lt;BR /&gt;Table1 input is
&lt;BR /&gt;ID,Number,Data
&lt;BR /&gt;A1,1,10
&lt;BR /&gt;A1,2,20
&lt;BR /&gt;A1,3,30
&lt;BR /&gt;A1,4,40
&lt;BR /&gt;A1,5,50
&lt;BR /&gt;Table2 input is
&lt;BR /&gt;ID,Number,Data
&lt;BR /&gt;A1,1,11
&lt;BR /&gt;A1,2,21
&lt;BR /&gt;A1,3,31
&lt;BR /&gt;A1,4,41
&lt;BR /&gt;A1,5,51
&lt;BR /&gt;Based on tFileInputDelimited_1, if Type = 'T1', then I load data from Table1, otherwise load data from Table2.
&lt;BR /&gt;The results is then fed into the JobChild.
&lt;BR /&gt;The results that I am expecting are:
&lt;BR /&gt;- if Type=T1, the tLogRow_1 (JobChild) output to be A1,150
&lt;BR /&gt;- if Type=T2, the tLogRow_1 (JobChild) output to be A1,155
&lt;BR /&gt;However, if I run, I am getting a results for each row, hence
&lt;BR /&gt; connecting to socket on port 4001
&lt;BR /&gt; connected
&lt;BR /&gt;A1|10.0
&lt;BR /&gt;A1|20.0
&lt;BR /&gt;A1|30.0
&lt;BR /&gt;A1|40.0
&lt;BR /&gt;A1|50.0
&lt;BR /&gt;A1|11.0
&lt;BR /&gt;A1|21.0
&lt;BR /&gt;A1|31.0
&lt;BR /&gt;A1|41.0
&lt;BR /&gt;A1|51.0</description>
      <pubDate>Mon, 30 Jan 2012 23:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfixedflowinput-and-trunjob/m-p/2300487#M72712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T23:38:48Z</dc:date>
    </item>
  </channel>
</rss>

