<?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: [resolved] Can't filter out Rows in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246945#M32294</link>
    <description>Hi Sabrina, &lt;BR /&gt;sorry for the late response here.&lt;BR /&gt;Yes i did read it and also this one &lt;BR /&gt;I still can't find my problem with this. &lt;BR /&gt;I can add the content of the other files, too if that helps&lt;BR /&gt;Best regards&lt;BR /&gt;Nils</description>
    <pubDate>Thu, 22 Sep 2016 08:26:47 GMT</pubDate>
    <dc:creator>NPreuschoff</dc:creator>
    <dc:date>2016-09-22T08:26:47Z</dc:date>
    <item>
      <title>[resolved] Can't filter out Rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246943#M32292</link>
      <description>Hi! 
&lt;BR /&gt;I'm trying to create a new component to automatical filter out all empty rows. 
&lt;BR /&gt;This component also serves as a learning experience for me so it's my first own component. 
&lt;BR /&gt;My Goal is to have a component which i can just drop into the flow to filter out the empty rows. 
&lt;BR /&gt;I know that this can be achieved with tFilterRow but i want a component which does it without any extra work. 
&lt;BR /&gt;At the moment the flow must have only variables of type String. I will implement the detection of the type later when the filtering works correctly. 
&lt;BR /&gt;&amp;nbsp; 
&lt;BR /&gt;My problem is that if i don't write the content of input_row to the output_row, Talend automatically writes the values from the row before into the output_row instead. 
&lt;BR /&gt;I got it working by putting a continue into the if-statement but this only works correct for flows that are just a single line and surely isn't the right way to do it. 
&lt;BR /&gt; 
&lt;BR /&gt;I tried to write the rejected rows into a second output instead but it didn't work. This just creates an empty output with the same rowcount as the input and doesn't change the filter output at all 
&lt;BR /&gt;Am i missing something? I read on a tutorial from powerupbi that i need DATA_AUTO_REPLICATE="false" in my headers but if i put it there the component can't be loaded and the Talendlog says, that DATA_AUTO_REPLICATE isn't allowed in the headers 
&lt;BR /&gt;I do have HAS_CONDITIONAL_OUTPUTS="true" in my Headers 
&lt;BR /&gt;I'm using Talend Data Fabric 6.2.1 
&lt;BR /&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Nils Preuschoff 
&lt;BR /&gt;tFilterEmptyRows_begin.javajet 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;%@ jet&lt;BR /&gt;    imports="&lt;BR /&gt;        org.talend.core.model.process.INode&lt;BR /&gt;        org.talend.core.model.process.ElementParameterParser&lt;BR /&gt;        org.talend.core.model.metadata.IMetadataTable&lt;BR /&gt;        org.talend.core.model.metadata.IMetadataColumn&lt;BR /&gt;        org.talend.core.model.process.IConnection&lt;BR /&gt;        org.talend.core.model.process.IConnectionCategory&lt;BR /&gt;        org.talend.designer.codegen.config.CodeGeneratorArgument&lt;BR /&gt;        org.talend.core.model.metadata.types.JavaTypesManager&lt;BR /&gt;        org.talend.core.model.metadata.types.JavaType&lt;BR /&gt;        java.util.List&lt;BR /&gt;        java.util.Map      &lt;BR /&gt;    "&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;    CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;&lt;BR /&gt;    INode node = (INode)codeGenArgument.getArgument();&lt;BR /&gt;    String cid = node.getUniqueName(); &lt;BR /&gt;%&amp;gt; &lt;BR /&gt;&lt;BR /&gt;int nb_line_&amp;lt;%=cid%&amp;gt; = 0;&lt;BR /&gt;int nb_line_empty_&amp;lt;%=cid%&amp;gt; = 0;&lt;BR /&gt;int nb_line_ok_&amp;lt;%=cid%&amp;gt; = 0;&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;tFilterEmptyRows_main.javajet 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;%@ jet&lt;BR /&gt;    imports="&lt;BR /&gt;        org.talend.core.model.process.INode&lt;BR /&gt;        org.talend.core.model.process.ElementParameterParser&lt;BR /&gt;        org.talend.core.model.metadata.IMetadataTable&lt;BR /&gt;        org.talend.core.model.metadata.IMetadataColumn&lt;BR /&gt;        org.talend.core.model.process.IConnection&lt;BR /&gt;        org.talend.core.model.process.IConnectionCategory&lt;BR /&gt;        org.talend.designer.codegen.config.CodeGeneratorArgument&lt;BR /&gt;        org.talend.core.model.metadata.types.JavaTypesManager&lt;BR /&gt;        org.talend.core.model.metadata.types.JavaType&lt;BR /&gt;        java.util.List&lt;BR /&gt;        java.util.Map      &lt;BR /&gt;    "&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;    CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;&lt;BR /&gt;    INode node = (INode)codeGenArgument.getArgument();&lt;BR /&gt;	String cid = node.getUniqueName(); &lt;BR /&gt;%&amp;gt;&lt;BR /&gt;	boolean empty = true; &amp;lt;%&lt;BR /&gt;	List&amp;lt; ? extends IConnection&amp;gt; incoming = node.getIncomingConnections();&lt;BR /&gt;	if ((incoming != null) &amp;amp;&amp;amp; (incoming.size() &amp;gt; 0)) {//A&lt;BR /&gt;		IConnection income2 = incoming.get(0);&lt;BR /&gt;		IMetadataTable income = income2.getMetadataTable();&lt;BR /&gt;		if (income != null) {//B&lt;BR /&gt;		  	List&amp;lt;IMetadataColumn&amp;gt; columns = income.getListColumns();  &lt;BR /&gt;		  	for( IMetadataColumn col : income.getListColumns() ) { %&amp;gt; &lt;BR /&gt;	&lt;BR /&gt;		  		&lt;BR /&gt;				if (&amp;lt;%=income2.getName()%&amp;gt;.&amp;lt;%= col%&amp;gt; != null &amp;amp;&amp;amp; !(&amp;lt;%=income2.getName()%&amp;gt;.&amp;lt;%= col%&amp;gt;.trim().isEmpty())) { //D&lt;BR /&gt;					&lt;BR /&gt;					empty  = false;&lt;BR /&gt;				}//D&lt;BR /&gt;				&amp;lt;%&lt;BR /&gt;			}%&amp;gt;  &lt;BR /&gt;		   &lt;BR /&gt;		   if(empty) {//E&lt;BR /&gt;		   		nb_line_empty_&amp;lt;%=cid %&amp;gt;++;	 &lt;BR /&gt;				continue;&lt;BR /&gt;		   		&lt;BR /&gt;		   } else {&lt;BR /&gt;		   	&amp;lt;%&lt;BR /&gt;		   	&lt;BR /&gt;		   		List&amp;lt; ? extends IConnection&amp;gt; filter_conns = node.getOutgoingConnections("FILTER");&lt;BR /&gt;		   		if ((filter_conns != null) &amp;amp;&amp;amp; (filter_conns.size() &amp;gt; 0)) {//F&lt;BR /&gt;					IConnection metadata = filter_conns.get(0);%&amp;gt;&lt;BR /&gt;				 	&amp;lt;%=metadata.getName()%&amp;gt; = new &amp;lt;%= metadata.getName() %&amp;gt;Struct();&lt;BR /&gt;					&amp;lt;%&lt;BR /&gt;					for(IMetadataColumn col : income.getListColumns() ) {//G&lt;BR /&gt;						%&amp;gt;&lt;BR /&gt;					&lt;BR /&gt;						&amp;lt;%=metadata.getName()%&amp;gt;.&amp;lt;%=col %&amp;gt; = &amp;lt;%= income2.getName() %&amp;gt;.&amp;lt;%= col %&amp;gt;;&lt;BR /&gt;						&lt;BR /&gt;						&amp;lt;%&lt;BR /&gt;					}//G	&lt;BR /&gt;		   		}//F&lt;BR /&gt;		   				%&amp;gt;&lt;BR /&gt;		   		nb_line_ok_&amp;lt;%=cid%&amp;gt;++;&lt;BR /&gt;		   }//E&lt;BR /&gt;		  &amp;lt;% &lt;BR /&gt;		 }//B&lt;BR /&gt;	}//A&lt;BR /&gt;    %&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    nb_line_&amp;lt;%=cid %&amp;gt;++;&lt;BR /&gt;    globalMap.put("&amp;lt;%=cid%&amp;gt;_NB_LINE",nb_line_&amp;lt;%=cid%&amp;gt;);&lt;BR /&gt;    globalMap.put("&amp;lt;%=cid%&amp;gt;_NB_LINE_EMPTY",nb_line_empty_&amp;lt;%=cid%&amp;gt;);&lt;BR /&gt;    globalMap.put("&amp;lt;%=cid%&amp;gt;_NB_LINE_OK",nb_line_ok_&amp;lt;%=cid%&amp;gt;);  &lt;BR /&gt;    &lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;tFilterEmptyRows_java.xml 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;COMPONENT&amp;gt;&lt;BR /&gt;  &amp;lt;HEADER&lt;BR /&gt;    PLATEFORM="ALL"&lt;BR /&gt;    SERIAL=""&lt;BR /&gt;    VERSION="0.1"&lt;BR /&gt;    STATUS="ALPHA"&lt;BR /&gt;  &lt;BR /&gt;    COMPATIBILITY="ALL"&lt;BR /&gt;    AUTHOR="Nils Preuschoff"&lt;BR /&gt;    RELEASE_DATE="20160829A"&lt;BR /&gt;    SCHEMA_AUTO_PROPAGATE="true"&lt;BR /&gt;    HAS_CONDITIONAL_OUTPUTS="true"&lt;BR /&gt;    DATA_AUTO_PROPAGATE="false"&lt;BR /&gt;    STARTABLE="false"&lt;BR /&gt;    PARTITIONING="AUTO"&lt;BR /&gt;	LOG4J_ENABLED="true"&lt;BR /&gt;  &amp;gt;&lt;BR /&gt;    &amp;lt;SIGNATURE/&amp;gt;&lt;BR /&gt;  &amp;lt;/HEADER&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;FAMILIES&amp;gt;&lt;BR /&gt;    &amp;lt;FAMILY&amp;gt;Quinscape&amp;lt;/FAMILY&amp;gt;&lt;BR /&gt;  &amp;lt;/FAMILIES&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;DOCUMENTATION&amp;gt;&lt;BR /&gt;    &amp;lt;URL/&amp;gt;&lt;BR /&gt;  &amp;lt;/DOCUMENTATION&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;CONNECTORS&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="0"/&amp;gt;&lt;BR /&gt;	&amp;lt;CONNECTOR NAME="FILTER" MAX_OUTPUT="1" CTYPE="FLOW" BASE_SCHEMA="FLOW" COLOR="086438" /&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" /&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" /&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="COMPONENT_OK" /&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="COMPONENT_ERROR" /&amp;gt;&lt;BR /&gt;    &amp;lt;CONNECTOR CTYPE="RUN_IF" /&amp;gt;&lt;BR /&gt;  &amp;lt;/CONNECTORS&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;PARAMETERS&amp;gt;&lt;BR /&gt;		&amp;lt;PARAMETER NAME="SCHEMA_FILTER" FIELD="SCHEMA_TYPE" CONTEXT="FILTER"  NUM_ROW="1"  READONLY="true"/&amp;gt;&lt;BR /&gt;	&lt;BR /&gt;  &amp;lt;/PARAMETERS&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;CODEGENERATION/&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;  &amp;lt;RETURNS&amp;gt;&lt;BR /&gt;    &amp;lt;RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER"/&amp;gt;&lt;BR /&gt;    &amp;lt;RETURN NAME="NB_LINE_OK" TYPE="id_Integer" AVAILABILITY="AFTER"/&amp;gt;&lt;BR /&gt;    &amp;lt;RETURN NAME="NB_LINE_EMPTY" TYPE="id_Integer" AVAILABILITY="AFTER"/&amp;gt;&lt;BR /&gt;  &amp;lt;/RETURNS&amp;gt;&lt;BR /&gt;  &lt;BR /&gt;&amp;lt;/COMPONENT&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246943#M32292</guid>
      <dc:creator>NPreuschoff</dc:creator>
      <dc:date>2024-11-16T10:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can't filter out Rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246944#M32293</link>
      <description>Hi,&lt;BR /&gt;Have you already checked article about:&lt;A href="https://help.talend.com/search/all?query=How+to+create+a+custom+component&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter:How to create a custom component&lt;/A&gt;?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 19 Sep 2016 08:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246944#M32293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-19T08:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can't filter out Rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246945#M32294</link>
      <description>Hi Sabrina, &lt;BR /&gt;sorry for the late response here.&lt;BR /&gt;Yes i did read it and also this one &lt;BR /&gt;I still can't find my problem with this. &lt;BR /&gt;I can add the content of the other files, too if that helps&lt;BR /&gt;Best regards&lt;BR /&gt;Nils</description>
      <pubDate>Thu, 22 Sep 2016 08:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246945#M32294</guid>
      <dc:creator>NPreuschoff</dc:creator>
      <dc:date>2016-09-22T08:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can't filter out Rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246946#M32295</link>
      <description>After i had some time again to look at this i finally found a solution
&lt;BR /&gt;I just needed to set the outputrow to null if the input is empty</description>
      <pubDate>Thu, 29 Dec 2016 10:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246946#M32295</guid>
      <dc:creator>NPreuschoff</dc:creator>
      <dc:date>2016-12-29T10:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can't filter out Rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246947#M32296</link>
      <description>Hi&amp;nbsp;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;NPreuschoff,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Thanks for posting that you have resolved this issue by yourself and sharing your solution here.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#5b5b5d"&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 30 Dec 2016 06:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-t-filter-out-Rows/m-p/2246947#M32296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-30T06:31:03Z</dc:date>
    </item>
  </channel>
</rss>

