{"title":"Rule-based Row Filter","nodeType":"Manipulator","id":"*Q-yW-3C9DumtInuz","factoryName":"org.knime.base.node.rules.engine.RuleEngineFilterNodeFactory","factoryId":"org.knime.base.node.rules.engine.RuleEngineFilterNodeFactory","path":["Manipulation","Row","Filter"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>This node takes a list of user-defined rules and tries to match them to each row in the input table. If the first matching rule has a <tt>TRUE</tt> outcome, the row will be selected for inclusion. Otherwise (i.e. if the first matching rule yields <tt>FALSE</tt> ) it will be excluded. If no rule matches the row will be excluded. Inclusion and exclusion may be inverted, see the options below.</p><p>Each rule is represented by a line. To add comments, start a line with <tt>//</tt> (comments can not be placed in the same line as a rule). Anything after <tt>//</tt> will not be interpreted as a rule. Rules consist of a condition part (antecedent), which must evaluate to <i>true</i> or <i>false</i> , and an outcome (consequent, after the &#61;&gt; symbol) which is either <tt>TRUE</tt> or <tt>FALSE</tt> .</p>\n            \t\t\t\n            <p>If no rule matches, the outcome is treated as if it were <tt>FALSE</tt> .</p>\n            \t\t\t\n            <p>Columns are given by their name surrounded by $, numbers are given in the usual decimal representation. Note that strings must not contain (double-)quotes (for those cases use the following syntax: <tt>/Oscar Wilde&#39;s wisdom: &#34;Experience is simply the name we give our mistakes.&#34;/</tt> ). The flow variables are represented by <b>$${<!-- --></b> TypeCharacterAndFlowVarName <b>}$$</b> . The TypeCharacter should be &#39;D&#39; for double (real) values, &#39;I&#39; for integer values and &#39;S&#39; for strings.</p>\n            \t\t\t\n            <p>The logical expressions can be grouped with parentheses. The precedence rules for them are the following: <tt>NOT</tt> binds most, <tt>AND</tt> , <tt>XOR</tt> and finally <tt>OR</tt> the least. Comparison operators always take precedence over logical connectives. All operators (and their names) are case-sensitive.</p>\n            \t\t\t\n            <p>The <tt>ROWID</tt> represents the row key string, the <tt>ROWINDEX</tt> is a the index of the row (first row has <tt>0</tt> value), while <tt>ROWCOUNT</tt> stands for the number of rows in the table.</p>\n            \t\t\t\n            <p>Some example rules (each should be in one line):</p>\n            \t\t\t\n            <pre>// This is a comment\n$Col0$ &gt; 0 &#61;&gt; TRUE\n</pre>\n            \t\t\tWhen the values in Col0 are greater than 0, we select the row (if no\n\t\t\tprevious rule matched with FALSE outcome).\n\t\t\t\n            <pre>$Col0$ &#61; &#34;Active&#34; AND $Col1$ &lt;&#61; 5 &#61;&gt; TRUE\n</pre>\n            \t\t\tYou can combine conditions.\n\t\t\t\n            <pre>$Col0$ LIKE &#34;Market Street*&#34; AND \n    ($Col1$ IN (&#34;married&#34;, &#34;divorced&#34;) \n        OR $Col2$ &gt; 40) &#61;&gt; FALSE\n</pre>\n            \t\t\tWith parentheses you can combine multiple conditions.\n\t\t\t\n            <pre>$Col0$ MATCHES $${SFlowVar0}$$ OR $$ROWINDEX$$ &lt; $${IFlowVar1}$$ &#61;&gt;\n    FALSE\n</pre>\n            \t\t\tThe flow variables, table constants can also appear in conditions.\n\t\t\t\n            <p>You can use either Ctrl&#43;Space to insert predefined parts, or select them from the upper controls.</p>\n            \t\t\t\n\t\t\t\n            <p>The following comparisons result true (other values are neither less, nor greater or equal to missing and NaN values):</p><ul><li><b>?</b> &#61;,&lt;&#61;,&gt;&#61; <b>?</b></li><li><b>NaN</b> &#61;,&lt;&#61;,&gt;&#61; <b>NaN</b></li></ul>\n                \t\t\t\n            \n            \t\t\n        \n        ","shortDescription":"Filters the input table based on user-defined business rules","keywords":["Condition","If then"],"deprecated":false,"streamable":true,"tags":["Manipulation","Row","Filter","Streamable"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWR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JyIj8+LlJYVwAAAJJJREFUeNqkUwEKwCAIzPD/X3a7yFCX0Uo4aIY3Pa8qIsUCEXM9Lx0uX0sIJVmEENH4qOUsBgm/BzkleUGnHbTAz68IbjRQwYnRyY+Z3QSug9nuoz9iMTbB8dLuONPOaYACi2TWNi+Ko1t5w3kzYhiJPlbOOkm0aG7k1TvYcGlupN4FKaCBwvpgS8TZeCjG+RFgABp0gQmIJRi2AAAAAElFTkSuQmCC","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Input table","description":"Any data table from which to filter rows"}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Filtered","description":"Data table with the included rows"}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"fields":[{"name":"Column List","description":"Available columns, which can be used as variables in a rule.","optional":false},{"name":"Flow Variable List","description":"Available flow variables, which can be used as variables in a rule.","optional":false},{"name":"Category","description":"The operator categories.","optional":false},{"name":"Function","description":"A list of valid operators in the selected category.","optional":false},{"name":"Description","description":"Short help about the operator.","optional":false},{"name":"Expression","description":"The rule editor. You can complete the expressions with Ctrl&#43;Space. Each row represents a rule. A red background of the line signals an error and the left side of the editor then shows an error icon.","optional":false},{"name":"Include TRUE matches","description":"A row will be <b>in</b> cluded in the output if the first rule that matches has TRUE outcome. If the first matching rule has a FALSE outcome or no rule matches the row will be excluded.","optional":false},{"name":"Exclude TRUE matches","description":"A row will be <b>ex</b> cluded in the output if the first rule that matches has TRUE outcome. If the first matching rule has a FALSE outcome or no rule matches the row will be included.","optional":false}]}],"links":[],"kudos":[{"accountId":"account:user:25410353-e434-451a-81a7-9e93541e9553","user":"tuyoisaza","date":"2023-11-07T01:57:33+00:00"}],"kudosCount":1,"bundleInformation":{"bundleVersion":"5.12.0.v202606171353","bundleName":"KNIME Java Snippet Nodes","bundleSymbolicName":"org.knime.jsnippets","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.javasnippet","featureName":"KNIME Javasnippet","featureVersion":"5.12.0.v202606171353","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*hXfYFyb7ZzM0xseG"},"frequentSuccessors":[{"id":"*5stmXk6zY_ORA4bC","factoryName":"org.knime.base.node.preproc.groupby.GroupByNodeFactory","probability":0.16377063423110338},{"id":"*ZgYyOm1P9VJVBE9e","factoryName":"org.knime.base.node.preproc.joiner.Joiner2NodeFactory","probability":0.10584998551983782},{"id":"*DOkyMaii62U05xZ1","factoryName":"org.knime.base.node.preproc.filter.column.DataColumnSpecFilterNodeFactory","probability":0.07435563278308717},{"id":"*Q-yW-3C9DumtInuz","factoryName":"org.knime.base.node.rules.engine.RuleEngineFilterNodeFactory","probability":0.05285259194902983},{"id":"*jd2U-FYTI8jCbQls","factoryName":"org.knime.base.node.preproc.filter.row.RowFilterNodeFactory","probability":0.039458441934549664},{"id":"*JiJhJpgkWWuOfG2s","factoryName":"org.knime.ext.poi2.node.write2.XLSWriter2NodeFactory","probability":0.0333043730089777},{"id":"*zpGPAjDyExkFL2HB","factoryName":"org.knime.base.node.rules.engine.RuleEngineNodeFactory","probability":0.028960324355632783},{"id":"*eOn8ibZnxIkY7XhT","factoryName":"org.knime.base.node.preproc.stringmanipulation.StringManipulationNodeFactory","probability":0.02736750651607298},{"id":"*0rhLXWO6OS1xMi8T","factoryName":"org.knime.base.node.preproc.append.row.AppendedRowsNodeFactory","probability":0.02519548218940052},{"id":"*2fI5rIsFDCFPHc0R","factoryName":"org.knime.ext.jep.JEPNodeFactory","probability":0.025050680567622358}]}
