"Applying new values based on filter"

clarkem1
New Altair Community Member
Hi Chaps,
I'm sure this is qa very simple thing but I cannot seem to find an operator which will let me do it. I essentially want to apply a filter on some data then allocate it to a particular group in a column, I.E IF Column C contains this then Column D belongs in group 1.
So simple I know but I would really appreciate some help. I have watched the tutorial videos and whilst they were useful didn't really answer my questions.
I'm sure this is qa very simple thing but I cannot seem to find an operator which will let me do it. I essentially want to apply a filter on some data then allocate it to a particular group in a column, I.E IF Column C contains this then Column D belongs in group 1.
So simple I know but I would really appreciate some help. I have watched the tutorial videos and whilst they were useful didn't really answer my questions.
0
Answers
-
Hi,
you are looking for the "Generate Attributes" operator.
Regards,
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.6.000-SNAPSHOT">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.6.000-SNAPSHOT" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="6.6.000-SNAPSHOT" expanded="true" height="68" name="Retrieve Deals" width="90" x="45" y="34">
<parameter key="repository_entry" value="//Samples/data/Deals"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="6.6.000-SNAPSHOT" expanded="true" height="82" name="Generate Attributes" width="90" x="179" y="34">
<list key="function_descriptions">
<parameter key="Rating" value="if(matches([Payment Method], ".*cheque.*"), "bad", "good")"/>
</list>
</operator>
<connect from_op="Retrieve Deals" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
<connect from_op="Generate Attributes" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Marco0 -
Thanks !0