<?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: Filter Content with tJava before processing. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330496#M99569</link>
    <description>&lt;P&gt;It appears that you are reading the file from a hardcoded location and converting it into a String content variable in the tJava. If this is the case, a simple way of doing this would be to simply perform a Java String.contains() search in a RunIf link which replaces your OnSubJobOK following the tJava_2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;context.InNifiMsg!=null&amp;amp;&amp;amp;context.InNifiMsg.contains("&amp;lt;DG1&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 10:45:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-11-01T10:45:54Z</dc:date>
    <item>
      <title>Filter Content with tJava before processing.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330495#M99568</link>
      <description>&lt;P&gt;My job is feed data (content ´)from a NIFI stream, but at times the stream feeds invalid data. &lt;/P&gt;&lt;P&gt;So before the message can be processed through the tExtract, I would like tJava to filter the content, and only allow messages that have a specific XML tag to proceed to downward components.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Is there a possible way I can do this without using the tFilter which is used after the tExtract?&lt;/P&gt;&lt;P&gt;Here is my section of the job with tjava at the start. I wish to be able to tell tJava that any message that does not contain &amp;lt;DG1&amp;gt; should not be read /dropped and the next one be read. How can I proceed with this, without sending null values to tExtract.&lt;/P&gt;&lt;P&gt;I would like to just have the code that I can put inside the tjava that says, if the content of context.NifiMsg contains &amp;lt;DG1&amp;gt; process, else Read next message (if there is any) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000YEZrOAAX.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147829i17E4EE1AE6A0C7E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000YEZrOAAX.png" alt="0695b00000YEZrOAAX.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330495#M99568</guid>
      <dc:creator>MAnywar</dc:creator>
      <dc:date>2024-11-15T22:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Content with tJava before processing.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330496#M99569</link>
      <description>&lt;P&gt;It appears that you are reading the file from a hardcoded location and converting it into a String content variable in the tJava. If this is the case, a simple way of doing this would be to simply perform a Java String.contains() search in a RunIf link which replaces your OnSubJobOK following the tJava_2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;context.InNifiMsg!=null&amp;amp;&amp;amp;context.InNifiMsg.contains("&amp;lt;DG1&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 10:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330496#M99569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-01T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Content with tJava before processing.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330497#M99570</link>
      <description>&lt;P&gt;Thanks so much. this saved me a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 11:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-Content-with-tJava-before-processing/m-p/2330497#M99570</guid>
      <dc:creator>MAnywar</dc:creator>
      <dc:date>2022-11-01T11:38:45Z</dc:date>
    </item>
  </channel>
</rss>

