Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

"How to get number of ExampleSet after Read Database"

thomas_wiedmannthomas_wiedmann Member Posts: 60 Maven
edited June 2019 in Help

Is there any way to get the number of rows (ExampleSet) from every "Read Database" inside a information value to work with?

I need to know how many rows come from every "Read Database" Query.

 

rm_get_example_counter.JPG

 

Thanks!

Thomas

 

 

Best Answer

  • lionelderkrikorlionelderkrikor RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn
    Solution Accepted

    Hi @thomas_wiedmann,

     

    Here an example of process (to adapt to your own project) to get the number of rows of an exampleset : 

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" breakpoints="after" class="retrieve" compatibility="8.1.001" expanded="true" height="68" name="Golf" width="90" x="112" y="120">
    <parameter key="repository_entry" value="//Samples/data/Golf"/>
    </operator>
    <operator activated="true" class="extract_macro" compatibility="8.1.001" expanded="true" height="68" name="Extract Macro" width="90" x="246" y="120">
    <parameter key="macro" value="eCount"/>
    <list key="additional_macros"/>
    </operator>
    <operator activated="true" class="provide_macro_as_log_value" compatibility="8.1.001" expanded="true" height="82" name="Provide Macro as Log Value" width="90" x="380" y="120">
    <parameter key="macro_name" value="eCount"/>
    </operator>
    <operator activated="true" class="log" compatibility="8.1.001" expanded="true" height="82" name="Log" width="90" x="514" y="136">
    <list key="log">
    <parameter key="Direct" value="operator.Extract Macro.value.macro_value"/>
    <parameter key="Indirect" value="operator.Provide Macro as Log Value.value.macro_value"/>
    </list>
    </operator>
    <connect from_op="Golf" from_port="output" to_op="Extract Macro" to_port="example set"/>
    <connect from_op="Extract Macro" from_port="example set" to_op="Provide Macro as Log Value" to_port="through 1"/>
    <connect from_op="Provide Macro as Log Value" from_port="through 1" to_op="Log" to_port="through 1"/>
    <connect from_op="Log" from_port="through 1" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="90"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>

    Does this solution answer to your need ?

     

    Regards,

     

     

    Lionel

Answers

Sign In or Register to comment.