"Join

MuehliManMuehliMan MemberPosts:85Guru
edited June 2019 inHelp
Dear RapidMiner community,

I have two tables (imported from Excel files), both containing one ID column and various properties. In addition to that for some examples there are names in table A and/or B. I joined both tables using the JOIN operator with an outer join to get a table containing all information. I did not check the remove duplicate attributes checkbox. So I am ending up with the columns names_from_A and names_from_B.

For some examples table A has a value for name, for some other table B has a value. In some cases there are names in table A and B. I want to join the tables in the way that there is one column called name which contains the name from A or B if only one is given and from A if both are given. In my opinion an operator doing somethig like: If name in table A is empty then take the name from table B should solve the problem. How can I do this?

And a second question:

How do I perform an operator that adds a prefix to all attribute names of a table? My guess again would be to use "loop attributes"

Thanks in advance,
Markus


Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2,531Unicorn
    Hi Markus,
    of course both is possible and I will post a process below, that will show how to handle it:





    <宏/ >

























    The Rename by Replacing operator will rename a bunch of attributes, selectable by the attribute filter parameters. Each attribute will then be renamed by replacing all matching regions of its name to the replace by parameter. Please note, that you can put in capturing groups. This is important for your problem. The following process will show how to prepend a common prefix:





    <宏/ >


















    Greetings,
    Sebastian
Sign InorRegisterto comment.