<?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: Reject data from xml in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Reject-data-from-xml/m-p/2235718#M24674</link>
    <description>&lt;P&gt;as idea, may be not fasted, but it will work&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) make list of invoices in file&amp;nbsp;(extract uniqueid from XML)&lt;/P&gt; 
&lt;P&gt;2) iterate over list - XML path for single uniqueid as TOP level&lt;/P&gt; 
&lt;P&gt;3) extract fiscal period from all parts -&amp;gt; make list unique -&amp;gt; count number&lt;/P&gt; 
&lt;P&gt;4) IF(runIf trigger) &amp;nbsp;number more than 1 - reject&lt;/P&gt; 
&lt;P&gt;5) IF number = 1 - continue Job&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 23:40:37 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2017-05-30T23:40:37Z</dc:date>
    <item>
      <title>Reject data from xml</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reject-data-from-xml/m-p/2235717#M24673</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt; 
&lt;P&gt;I have trouble to filter data in&amp;nbsp;a job in talend TOS DI&amp;nbsp;6.2.1.&lt;/P&gt; 
&lt;P&gt;The purpose of the job is to load and transform an xml file containing one (or more) invoice. The first layers of the tree contain the header, then the deepest contain the invoice lines. Ex:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2017-05-30 à 10.29.54.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lumk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135326iCE0DFAC492A30F71/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lumk.png" alt="0683p000009Lumk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Everything worked well until I need to reject the whole invoice (not just the lines) if all of&amp;nbsp;"fiscal_period" fields (invoice lines) of an invoice do not have the same value, Ex:&lt;/P&gt; 
&lt;P&gt;Invoice number =&amp;nbsp;12193624860002852&lt;/P&gt; 
&lt;P&gt;If&amp;nbsp;line in field "fiscal_period" not equals to prévious&amp;nbsp;&lt;SPAN&gt;"fiscal_period"&amp;nbsp;then reject invoice and send this reject to a file.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Currently I have created a global variable and a tMemorizeRows that allows me to identify when the "fiscal_period" is different from "fiscal_period" previous line.&lt;BR /&gt;Then with a tjava_row I set the variable to true or false, finally with a t_filterrow I reject and send to Excel log errors file. &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Problem is: the lines are rejected but not the entire invoice.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Does anyone have an idea for a solution?&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Oliver.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;PS: My Job looks like this:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture d’écran 2017-05-30 à 10.50.38.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Luit.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147831i83589514BDC1BCBE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Luit.png" alt="0683p000009Luit.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 10:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reject-data-from-xml/m-p/2235717#M24673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-30T10:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reject data from xml</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reject-data-from-xml/m-p/2235718#M24674</link>
      <description>&lt;P&gt;as idea, may be not fasted, but it will work&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) make list of invoices in file&amp;nbsp;(extract uniqueid from XML)&lt;/P&gt; 
&lt;P&gt;2) iterate over list - XML path for single uniqueid as TOP level&lt;/P&gt; 
&lt;P&gt;3) extract fiscal period from all parts -&amp;gt; make list unique -&amp;gt; count number&lt;/P&gt; 
&lt;P&gt;4) IF(runIf trigger) &amp;nbsp;number more than 1 - reject&lt;/P&gt; 
&lt;P&gt;5) IF number = 1 - continue Job&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 23:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reject-data-from-xml/m-p/2235718#M24674</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-05-30T23:40:37Z</dc:date>
    </item>
  </channel>
</rss>

