The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.

Rename operator

Legacy UserLegacy User Member Posts: 0 Newbie
edited November 2018 in Help

I have a Read CSV operator, and the data source is:
Ok, now i wanna use a Rename operator, to rename those attributes.. if you run the process you'll see that the 1st attribute, for example is Recency (months), then Frequency (times) and so on..
But i cannot use the rename attribute.. i cannot specify the old name, and to provide a new name. WHY? I need to rename because i wanna use a Write database operator, and the attribute names are the columns of the database table.

Some ideas?


  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn

    It often looks like it won't work because the metadata has got lost but if you simply enter the name of the attributes manually, you can get what you want.

    Here's an example
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.1.006">
      <operator activated="true" class="process" compatibility="5.1.006" expanded="true" name="Process">
        <process expanded="true" height="618" width="1119">
          <operator activated="true" class="read_csv" compatibility="5.1.006" expanded="true" height="60" name="Read CSV" width="90" x="45" y="30">
            <parameter key="csv_file" value=""/>
            <parameter key="column_separators" value=","/>
            <list key="annotations"/>
            <list key="data_set_meta_data_information"/>
          <operator activated="true" class="rename" compatibility="5.1.006" expanded="true" height="76" name="Rename" width="90" x="179" y="30">
            <parameter key="old_name" value="Recency (months)"/>
            <parameter key="new_name" value="recency"/>
            <list key="rename_additional_attributes">
              <parameter key="Frequency (times)" value="frequency"/>
              <parameter key="Monetary (c.c. blood)" value="monetary"/>
              <parameter key="Time (months)" value="time"/>
              <parameter key="whether he/she donated blood in March 2007" value="whether"/>
          <connect from_op="Read CSV" from_port="output" to_op="Rename" to_port="example set input"/>
          <connect from_op="Rename" 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"/>

Sign In or Register to comment.