The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 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
Generate attribute is taking wrong macro value
Himanshu_Pant
Member Posts: 46 Learner II
in Help
I have declared a macro b =5 but the generate attribute operator is taking it as 2. I have added xml, please help
<?xml version="1.0" encoding="UTF-8"?><process version="9.9.000">
<?xml version="1.0" encoding="UTF-8"?><process version="9.9.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="9.9.000" expanded="true" name="Process">
<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" class="set_macros" compatibility="9.9.000" expanded="true" height="68" name="Set Macros" width="90" x="112" y="187">
<list key="macros">
<parameter key="abcd" value="2"/>
<parameter key="xyzs" value="5"/>
<parameter key="c" value="1"/>
</list>
</operator>
<operator activated="true" class="retrieve" compatibility="9.9.000" expanded="true" height="68" name="Retrieve dates" width="90" x="45" y="34">
<parameter key="repository_entry" value="//sdbc_rapid_miner/processes/dates"/>
</operator>
<operator activated="true" class="nominal_to_date" compatibility="9.9.000" expanded="true" height="82" name="Nominal to Date (3)" width="90" x="313" y="34">
<parameter key="attribute_name" value="Dates"/>
<parameter key="date_type" value="date_time"/>
<parameter key="date_format" value="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
<parameter key="time_zone" value="SYSTEM"/>
<parameter key="locale" value="English (United States)"/>
<parameter key="keep_old_attribute" value="true"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="9.9.000" expanded="true" height="82" name="Generate Attributes (3)" width="90" x="581" y="34">
<list key="function_descriptions">
<parameter key="Event DateTime_adjusted" value="-eval(%{b})"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<connect from_op="Retrieve dates" from_port="output" to_op="Nominal to Date (3)" to_port="example set input"/>
<connect from_op="Nominal to Date (3)" from_port="example set output" to_op="Generate Attributes (3)" to_port="example set input"/>
<connect from_op="Generate Attributes (3)" 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>
0
Best Answer
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data ScientistHi,be careful with single letter macros, there are some predefined macros. a is one of them.Edit: The full list is here: https://docs.rapidminer.com/latest/studio/getting-started/macros.html . The dangerous ones are a,b,c and n.Best,Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany1
Answers