"a question about filter data or SQl Querying with Rapid Miner"

Wolfsburg2011
Wolfsburg2011 New Altair Community Member
edited November 5 in Community Q&A
hello,
can somebody tell me please, how I can find out which data fields are not fulfilled . for example, I have a data bank and I want to know which customer has not given his address. i.e  which customer id  has a missing value. I have tried it with select attribute, but it did not work. Thank you for your reply.

Answers

  • colo
    colo New Altair Community Member
    Hi,

    if you want to find a customer without an address specified, you have to filter the rows, not the columns (attributes). If the task is as simple as you described, the operator "Filter Examples" with condition class "missing_attributes" should do the trick. When just some of the attributes shall be tested, you have to use "attribute_value_filter" (for details take a look at the operator description).

    If this is not what you wanted, you will probably have to specify the task in more detail.

    Regards
    Matthias
  • Wolfsburg2011
    Wolfsburg2011 New Altair Community Member
    Hello,
    I have tested it with Filtter Exampels, the result was not what I wantet.  I have Attribute_value_filtter unfortunately not found. But I try to explain my problem with an Example.customer ID 111 111 has not given his address and I want to see after filter the data the number ID 111111.  by Example-Filter I noticed that for example three customer have not given their Adress but I did not Know Which one! ???  I've done it wrong? thank you for your reply. :)
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    colo is correct. If you just want to find all rows where there is a missing value in the address column, then use this very simple process:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.1.008">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.1.008" expanded="true" name="Process">
        <process expanded="true" height="206" width="480">
          <operator activated="true" class="retrieve" compatibility="5.1.008" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="//LocalRepository/customerData"/>
          </operator>
          <operator activated="true" class="filter_examples" compatibility="5.1.008" expanded="true" height="76" name="Filter Examples" width="90" x="179" y="30">
            <parameter key="condition_class" value="attribute_value_filter"/>
            <parameter key="parameter_string" value="address= \?"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="Filter Examples" to_port="example set input"/>
          <connect from_op="Filter Examples" 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>
    Regards,
    Marco
  • Wolfsburg2011
    Wolfsburg2011 New Altair Community Member
    Hi,
    thanks a lot for your help. but I am total new and I do not know, how can I run It ??? can you please tell it me. :)
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    in the main process design window are 2 tabs: Process and XML. To design a process you're using the Process tab, however if you need the xml which describes the process, you can click the XML tab and edit the xml directly. So switch to the XML tab, replace everything in there with the code I posted above, and click the green Apply Changes button. Now you can switch back to Process and edit the parameters so the process fits your needs.

    Regards,
    Marco
  • Wolfsburg2011
    Wolfsburg2011 New Altair Community Member
    Hi,
    it works :D. Thanks a lot for your help. :)