Options

Excluding more than one attribute by name

mjbmjb Member Posts: 4 Contributor I
edited November 2018 in Help
Please could somebody tell me how to exclude two attributes by name. I've managed to exclude one attribute using an attribute filter and selecting attribute name filter, but the A && B syntax described in the manual doesn't seem to work. Thanks, and sorry my first post is so inane

Answers

  • Options
    haddockhaddock Member Posts: 849 Maven
    Hi there,

    No probs on in(s)anity, I've done a ludicrous number of posts and conclude that the more you do the worse it gets. You can use a regex filter to zap attributes. Here's how to extract att1 and att2 by name...
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input>
          <location/>
        </input>
        <output>
          <location/>
          <location/>
        </output>
        <macros/>
      </context>
      <operator activated="true" class="process" expanded="true" name="Process">
        <process expanded="true" height="-20" width="-50">
          <operator activated="true" class="generate_data" expanded="true" height="60" name="Generate Data" width="90" x="50" y="69"/>
          <operator activated="true" class="select_attributes" expanded="true" height="76" name="Select Attributes" width="90" x="277" y="66">
            <parameter key="attribute_filter_type" value="regular_expression"/>
            <parameter key="regular_expression" value="att1|att2"/>
            <parameter key="invert_selection" value="true"/>
          </operator>
          <connect from_op="Generate Data" from_port="output" to_op="Select Attributes" to_port="example set input"/>
          <connect from_op="Select 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>
  • Options
    mjbmjb Member Posts: 4 Contributor I
    Thanks Captain.
Sign In or Register to comment.