Changes are not applied in operators connected to the 'Rename by Example Values' operator

kimjk3559
kimjk3559 Altair Community Member
edited November 5 in Community Q&A
<?xml version="1.0" encoding="UTF-8"?><process version="10.3.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="10.3.000" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value=""/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
      <operator activated="true" breakpoints="after" class="subprocess" compatibility="10.3.000" expanded="true" height="82" name="Subprocess" origin="GENERATED_TUTORIAL" width="90" x="313" y="30">
        <process expanded="true">
          <operator activated="true" class="generate_nominal_data" compatibility="10.3.000" expanded="true" height="68" name="Generate Nominal Data" origin="GENERATED_TUTORIAL" width="90" x="380" y="30">
            <parameter key="number_examples" value="100"/>
            <parameter key="number_of_attributes" value="2"/>
            <parameter key="number_of_values" value="5"/>
            <parameter key="use_local_random_seed" value="false"/>
            <parameter key="local_random_seed" value="1992"/>
          </operator>
          <operator activated="true" class="set_data" compatibility="10.3.000" expanded="true" height="82" name="Set Data" origin="GENERATED_TUTORIAL" width="90" x="514" y="30">
            <parameter key="example_index" value="1"/>
            <parameter key="count_backwards" value="false"/>
            <parameter key="attribute_name" value="label"/>
            <parameter key="value" value="new_label"/>
            <list key="additional_values">
              <parameter key="att1" value="new_name1"/>
              <parameter key="att2" value="new_name2"/>
            </list>
          </operator>
          <connect from_op="Generate Nominal Data" from_port="output" to_op="Set Data" to_port="example set input"/>
          <connect from_op="Set Data" from_port="example set output" to_port="out 1"/>
          <portSpacing port="source_in 1" spacing="0"/>
          <portSpacing port="sink_out 1" spacing="0"/>
          <portSpacing port="sink_out 2" spacing="0"/>
        </process>
      </operator>
      <operator activated="true" breakpoints="after" class="blending:rename_by_example_values" compatibility="10.3.000" expanded="true" height="82" name="Rename by Example Values" origin="GENERATED_TUTORIAL" width="90" x="514" y="30">
        <parameter key="row_number" value="1"/>
      </operator>
      <operator activated="true" class="blending:set_role" compatibility="10.3.000" expanded="true" height="82" name="Set Role" width="90" x="715" y="34">
        <list key="set_roles"/>
      </operator>
      <connect from_op="Subprocess" from_port="out 1" to_op="Rename by Example Values" to_port="example set input"/>
      <connect from_op="Rename by Example Values" from_port="example set 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>



The above process is a process that additionally connects 'set role' to the 'Rename by Example Values' operator's tutorial.

'Rename by Example Values' changes the column name, but 'set role' does not recognize the changed name.

Am I doing something wrong? Please confirm

thank you
Tagged:

Best Answer

  • RolandJones
    RolandJones
    Altair Employee
    edited November 2023 Answer ✓
    Hi @kimjk,

    If I understand your problem correctly, when trying to use Set Role you don't see the new attribute names available? This is likely due to the metadata not catching up, I would suggest enabling the option shown in the screenshot below and adding a breakpoint before the Set Role operator. For me this then works.

    Best,

    Roland


    EDIT: Also just to add that manually typing the attribute names into the appropriate fields in Set Role also works, the metadata not catching up simply means you can't select from a drop down.

Answers

  • RolandJones
    RolandJones
    Altair Employee
    edited November 2023 Answer ✓
    Hi @kimjk,

    If I understand your problem correctly, when trying to use Set Role you don't see the new attribute names available? This is likely due to the metadata not catching up, I would suggest enabling the option shown in the screenshot below and adding a breakpoint before the Set Role operator. For me this then works.

    Best,

    Roland


    EDIT: Also just to add that manually typing the attribute names into the appropriate fields in Set Role also works, the metadata not catching up simply means you can't select from a drop down.