[SOLVED] Extract location of current process to data

JEdwardJEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 564   Unicorn
edited November 2018 in Help
Hi all,

I had an idea that I could extract the location of a current process using Log & Log to Data operators.  However, although the value prints to the console I can't see anything on the results page just a blank attribute.  Have I done something wrong?  Should I use a different operator?  

It works if I store the log value as a Filename, but I don't want to do this as I just want the datavalue.  
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
   <process expanded="true">
     <operator activated="true" class="log" compatibility="5.3.015" expanded="true" height="76" name="Log" width="90" x="45" y="30">
       <list key="log">
         <parameter key="FileName" value="operator.Log.parameter.filename"/>
       </list>
     </operator>
     <operator activated="true" class="print_to_console" compatibility="5.3.015" expanded="true" height="76" name="Print to Console" width="90" x="112" y="120">
       <parameter key="log_value" value="FileName"/>
     </operator>
     <operator activated="true" class="log_to_data" compatibility="5.3.015" expanded="true" height="94" name="Log to Data" width="90" x="246" y="30"/>
     <connect from_op="Log" from_port="through 1" to_op="Print to Console" to_port="through 1"/>
     <connect from_op="Print to Console" from_port="through 1" to_op="Log to Data" to_port="through 1"/>
     <connect from_op="Log to Data" from_port="exampleSet" 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>

Answers

  • Marco_BoeckMarco_Boeck Team Lead Software Engineering Moderator, Employee, Member, University Professor Posts: 1,806   RM Engineering
    Hi,

    is that what you want?

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="6.0.006">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="log" compatibility="6.0.006" expanded="true" height="76" name="Log" width="90" x="45" y="30">
            <list key="log">
              <parameter key="FileName" value="operator.Print to Console.parameter.log_value"/>
            </list>
          </operator>
          <operator activated="true" class="print_to_console" compatibility="6.0.006" expanded="true" height="76" name="Print to Console" width="90" x="179" y="30">
            <parameter key="log_value" value="%{process_path}"/>
          </operator>
          <operator activated="true" class="log_to_data" compatibility="6.0.006" expanded="true" height="94" name="Log to Data" width="90" x="313" y="30"/>
          <connect from_op="Log" from_port="through 1" to_op="Print to Console" to_port="through 1"/>
          <connect from_op="Print to Console" from_port="through 1" to_op="Log to Data" to_port="through 1"/>
          <connect from_op="Log to Data" from_port="exampleSet" 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
  • JEdwardJEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 564   Unicorn
    Exactly!

    But all I really needed was:
    I should really read the manual for reserved macros.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.015">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.015" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="30">
            <list key="attribute_values">
              <parameter key="ProPath" value="&quot;%{process_path}&quot;"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <connect from_op="Generate Data by User Specification" from_port="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>
Sign In or Register to comment.