Pages: [1]
  Print  
Author Topic: [SOLVED] Extract location of current process to data  (Read 120 times)
JEdward
Full Member
***
Posts: 145


« on: June 27, 2014, 09:17:58 AM »

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.  

Code:
<?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>
« Last Edit: June 30, 2014, 10:03:14 AM by JEdward » Logged
Marco Boeck
Administrator
Hero Member
*****
Posts: 897


WWW
« Reply #1 on: June 27, 2014, 10:27:55 AM »

Hi,

is that what you want?

Code:
<?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
Logged

Join us in Boston for the RapidMiner World conference!

RapidMiner Studio 6 | RapidMiner Studio 6 Q&A
JEdward
Full Member
***
Posts: 145


« Reply #2 on: June 30, 2014, 07:49:28 AM »

Exactly!

But all I really needed was:
I should really read the manual for reserved macros.

Code:
<?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>
Logged
Pages: [1]
  Print  
 
Jump to: