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.

[Solved]Defining Compound Key

aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
Hi,

I want to have 2 attributes as IDs (compound key) but when I set roles for 2 Attribute as ids one of them disappears , how can I keep both of them as ids ?

Thanks ,
Arian

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.008">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
   <process expanded="true" height="631" width="1094">
     <operator activated="true" class="generate_nominal_data" compatibility="5.2.008" expanded="true" height="60" name="Generate Nominal Data" width="90" x="45" y="30"/>
     <operator activated="true" class="set_role" compatibility="5.2.008" expanded="true" height="76" name="Set Role" width="90" x="246" y="30">
       <parameter key="name" value="att1"/>
       <parameter key="target_role" value="id"/>
       <list key="set_additional_roles">
         <parameter key="att2" value="id"/>
       </list>
     </operator>
     <connect from_op="Generate Nominal Data" from_port="output" to_op="Set Role" to_port="example set input"/>
     <connect from_op="Set Role" 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>

Answers

  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi Arian,

    the role ID can only be assigned once. But you can define roles on your own. Just type in the name of the role you want.
    What are you planning to do with your compound key?

    Best,
    Nils
  • aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
    Hi Nils ,

    Thanks , it works , sorry for the delay ,

    Arian
  • aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
    Oh , I forgot to answer your question ,

    I needed it because I wanted to have a compound key ,

    Arian
Sign In or Register to comment.