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

How to store each iteration of the loop with different filenames ?

HarshavHarshav Member Posts: 33 Learner II
Fore each iteration ,I get one dataframe which needs to be stored with the table name as table_name_{value}.Can you suggest me how to store all loop results with different table names

Best Answers

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi,

    in the Write Database operator (and almost everywhere else) you can use macros in the "table name" parameter. 

    It would be something like: table_name_%{loop_nr}

    The iteration number would be in a macro, this is mostly automatic with the Loop operators in RapidMiner.

    There are different videos for macros in the Academy if you'd like to learn more about them:
    https://academy.rapidminer.com/catalog?query=macros

    Regards,
    Balázs
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Solution Accepted
    Hi,
    I think you can use the normal Generate Macro within a Radoop Nest. Not sure though - please give it a try.

    Best,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany

Answers

  • HarshavHarshav Member Posts: 33 Learner II
    Hi balazs,

    Thank you for responding to the above problem. FYI I'm working in radoop nest and I could find only two operators loop and loop attributes .

    When I'm storing in hive database like you said table_name_%{loop_attribute} , I couldnt store in different tables since %{loop_attribute} is just column name. How do i store it with different names in this case ?


    P.S.- There is loop values that can be used in sparkrm but my whole process is built with radoop operators which needs to looped and store it with different names . 
  • HarshavHarshav Member Posts: 33 Learner II
    Thank you martin I used extract macro(sparkrm) in loop attributes and store it with different names in store in this format  table_name_%{macro} :)
Sign In or Register to comment.