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
extracting name from retrieved dataset as subdirectory name
mansour_ebrahim
Member Posts: 22 Contributor II
in Help
Dear All
Somehow I need a tool to extract a name from the Retrieved dataset (its name) and set it as the name for new subdirectory when I use Create Directory operator.
Somehow I need a tool to extract a name from the Retrieved dataset (its name) and set it as the name for new subdirectory when I use Create Directory operator.
0
Best Answer
-
rfuentealba RapidMiner Certified Analyst, Member, University Professor Posts: 568 UnicornHello @mansour_ebrahim
You may want to see the Annotate, the Extract Macro from Annotation operators.
I just made a few tests, nothing important but see this process:<?xml version="1.0" encoding="UTF-8"?><process version="9.2.001"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="6.0.002" 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" class="retrieve" compatibility="9.2.001" expanded="true" height="68" name="Retrieve Iris" origin="GENERATED_TUTORIAL" width="90" x="45" y="34"> <parameter key="repository_entry" value="//Samples/data/Iris"/> </operator> <operator activated="true" class="multiply" compatibility="9.2.001" expanded="true" height="103" name="Multiply" width="90" x="179" y="34"/> <operator activated="true" class="annotations_to_data" compatibility="9.2.001" expanded="true" height="82" name="Annotations to Data" width="90" x="313" y="187"/> <operator activated="true" class="extract_macro_from_annotation" compatibility="9.2.001" expanded="true" height="68" name="Extract Macro from Annotation" origin="GENERATED_TUTORIAL" width="90" x="313" y="34"> <parameter key="extract_all" value="false"/> <parameter key="macro" value="Source"/> <parameter key="annotation" value="Source"/> <parameter key="fail_on_missing" value="true"/> </operator> <operator activated="true" class="generate_macro" compatibility="9.2.001" expanded="true" height="82" name="Generate Macro" width="90" x="447" y="34"> <list key="function_descriptions"> <parameter key="wat" value="replace(%{Source}, "data", "")"/> </list> </operator> <operator activated="true" class="print_to_console" compatibility="9.2.001" expanded="true" height="82" name="Print to Console" origin="GENERATED_TUTORIAL" width="90" x="581" y="34"> <parameter key="log_value" value="Source annotation is: %{wat}"/> </operator> <connect from_op="Retrieve Iris" from_port="output" to_op="Multiply" to_port="input"/> <connect from_op="Multiply" from_port="output 1" to_op="Extract Macro from Annotation" to_port="object"/> <connect from_op="Multiply" from_port="output 2" to_op="Annotations to Data" to_port="object"/> <connect from_op="Annotations to Data" from_port="annotations" to_port="result 2"/> <connect from_op="Extract Macro from Annotation" from_port="object" to_op="Generate Macro" to_port="through 1"/> <connect from_op="Generate Macro" from_port="through 1" to_op="Print to Console" to_port="through 1"/> <connect from_op="Print to Console" from_port="through 1" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="126"/> <portSpacing port="sink_result 3" spacing="0"/> </process> </operator> </process>
Hope this helps,
Rodrigo.
7
Answers
To use the XML, you need to open a new process in rapidminer. After that, you need to go to View --> Show Panel --> XML present in the menu bar of rapdiminer. You need to copy the XML code provided in the above post and paste it in the XML window of rapidminer, then click the green tick mark on the XML window and you can see the process mention by rodrigo in your RM.
Thanks,
Varun
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
Mansour