<?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 Data Flow control mechanisms in Talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Data-Flow-control-mechanisms-in-Talend/m-p/2344216#M111894</link>
    <description>Hi everyone, 
&lt;BR /&gt;I have a job that implements a simple web service. 
&lt;BR /&gt;The job should do this: 
&lt;BR /&gt;1. Retrieve some of the request parameters and memorize them 
&lt;BR /&gt;2. Use those parameters in a SQL query (its where-clauses) to fetch data 
&lt;BR /&gt;3. Filter that data 
&lt;BR /&gt;4. Create some response 
&lt;BR /&gt;I have problems with filtering in Talend, though; here's a sample of the process that needs to happen: 
&lt;BR /&gt;TAKE all the data you fetched from the database 
&lt;BR /&gt;SPLIT the result set into 2 lists: 
&lt;BR /&gt; List A contains all result set records that match a certain pattern (that have certain values in a certain field) 
&lt;BR /&gt; List B contains the rest 
&lt;BR /&gt;IF List A is empty, use List B 
&lt;BR /&gt;IF the List (A or B - depending on the previous step) has more than 20 records, throw a fault 
&lt;BR /&gt;SORT that List by the Date in field A or field B (Take field B if field A is empty) 
&lt;BR /&gt;Take the top 1 record 
&lt;BR /&gt;If field C of that top 1 record contains a certain value, throw a fault 
&lt;BR /&gt;Take field D and create a response 
&lt;BR /&gt;That's a simple filter algorithm that requires not only data flow (sorting, simple filtering) but also flow control (IF/THEN-conditions, branches, counting of number of rows etc.) 
&lt;BR /&gt;But how can that be done in Talend? 
&lt;BR /&gt;I find the filter and row sort mechanisms too rudimentary (or I don't understand them fully). 
&lt;BR /&gt;And I have not seen anything that implements conditions in an intuitive way. 
&lt;BR /&gt;Any ideas? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Matt</description>
    <pubDate>Wed, 16 Jul 2014 10:41:37 GMT</pubDate>
    <dc:creator>kleinmat</dc:creator>
    <dc:date>2014-07-16T10:41:37Z</dc:date>
    <item>
      <title>Data Flow control mechanisms in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-Flow-control-mechanisms-in-Talend/m-p/2344216#M111894</link>
      <description>Hi everyone, 
&lt;BR /&gt;I have a job that implements a simple web service. 
&lt;BR /&gt;The job should do this: 
&lt;BR /&gt;1. Retrieve some of the request parameters and memorize them 
&lt;BR /&gt;2. Use those parameters in a SQL query (its where-clauses) to fetch data 
&lt;BR /&gt;3. Filter that data 
&lt;BR /&gt;4. Create some response 
&lt;BR /&gt;I have problems with filtering in Talend, though; here's a sample of the process that needs to happen: 
&lt;BR /&gt;TAKE all the data you fetched from the database 
&lt;BR /&gt;SPLIT the result set into 2 lists: 
&lt;BR /&gt; List A contains all result set records that match a certain pattern (that have certain values in a certain field) 
&lt;BR /&gt; List B contains the rest 
&lt;BR /&gt;IF List A is empty, use List B 
&lt;BR /&gt;IF the List (A or B - depending on the previous step) has more than 20 records, throw a fault 
&lt;BR /&gt;SORT that List by the Date in field A or field B (Take field B if field A is empty) 
&lt;BR /&gt;Take the top 1 record 
&lt;BR /&gt;If field C of that top 1 record contains a certain value, throw a fault 
&lt;BR /&gt;Take field D and create a response 
&lt;BR /&gt;That's a simple filter algorithm that requires not only data flow (sorting, simple filtering) but also flow control (IF/THEN-conditions, branches, counting of number of rows etc.) 
&lt;BR /&gt;But how can that be done in Talend? 
&lt;BR /&gt;I find the filter and row sort mechanisms too rudimentary (or I don't understand them fully). 
&lt;BR /&gt;And I have not seen anything that implements conditions in an intuitive way. 
&lt;BR /&gt;Any ideas? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Matt</description>
      <pubDate>Wed, 16 Jul 2014 10:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-Flow-control-mechanisms-in-Talend/m-p/2344216#M111894</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-07-16T10:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Data Flow control mechanisms in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Data-Flow-control-mechanisms-in-Talend/m-p/2344217#M111895</link>
      <description>Hi Matt, 
&lt;BR /&gt;TAKE all the data you fetched from the database 
&lt;BR /&gt;&amp;gt;&amp;gt; take database Input component 
&lt;BR /&gt;SPLIT the result set into 2 lists: 
&lt;BR /&gt;&amp;gt;&amp;gt; Use tReplicate component 
&lt;BR /&gt; List A contains all result set records that match a certain pattern (that have certain values in a certain field) 
&lt;BR /&gt;&amp;gt;&amp;gt; Use tFilter with appropriate condition for A output connect output to tHash component 
&lt;BR /&gt; List B contains the rest 
&lt;BR /&gt;&amp;gt;&amp;gt; use tFilter with another condition for B output connect output to tHash component 
&lt;BR /&gt;IF List A is empty, use List B 
&lt;BR /&gt;&amp;gt;&amp;gt; Use RunIf clause from tHash component use appropriate condition 
&lt;BR /&gt;IF the List (A or B - depending on the previous step) has more than 20 records, throw a fault 
&lt;BR /&gt;&amp;gt;&amp;gt; Use RunIf clause from tFilter use appropriate condition and connect to tWarn/tDie or generate your exception using tJava 
&lt;BR /&gt;SORT that List by the Date in field A or field B (Take field B if field A is empty) 
&lt;BR /&gt;&amp;gt;&amp;gt; Use RunIf and take appropriate tHash component and get the records 
&lt;BR /&gt;Take the top 1 record 
&lt;BR /&gt;&amp;gt;&amp;gt; Need to use again tFilter to get the Top record based on the data values 
&lt;BR /&gt;If field C of that top 1 record contains a certain value, throw a fault 
&lt;BR /&gt;Take field D and create a response 
&lt;BR /&gt;&amp;gt;&amp;gt; Use context variables during your job for conditions to be used in RunIf ... 
&lt;BR /&gt;Hope you got some idea... 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;vaibhav</description>
      <pubDate>Wed, 16 Jul 2014 11:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Data-Flow-control-mechanisms-in-Talend/m-p/2344217#M111895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-16T11:08:57Z</dc:date>
    </item>
  </channel>
</rss>

