Options

[SOLVED] ROWNUMBER() in RapidMiner

Mario_HofmannMario_Hofmann Member Posts: 9 Contributor II
edited November 2018 in Help
Hello,

currently I m trying to get my whole ETL for a process in Rapidminer. I ve got a table (A & B) like:

colA | colB | colC
A    | 2      | 1
A    | 4      | 2
B    | 1      | 1
C    | 2      | 1
C    | 3      | 2

Is there a way to create column C in rapidminer? In MS SQL I can use Row_Number and Partition (http://msdn.microsoft.com/de-de/library/ms186734.aspx) . I found a way using Loop Values, but this is far too slow for a table with several 10ks of examples.

Regards,

Mario

Answers

  • Options
    MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi Mario,

    what are you doing in Loop Values? Actually, to create an index for each unique value in column A, there is no other choice currently in RapidMiner than using Loop Values. Inside, you could use Generate ID, which should be quite fast.

    Best regards,
    Marius
  • Options
    Mario_HofmannMario_Hofmann Member Posts: 9 Contributor II
    Hi Marius,

    I was actually already doing the filtering inside the loop, just to generate the id is of course a much better idea. But I am close to finalize my process, I will report on the results. :)

    Regards,

    Mario
  • Options
    MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Well, of course you also have to filter before generating the id, otherwise you get an id for the complete dataset, not only for the current value oO
  • Options
    Mario_HofmannMario_Hofmann Member Posts: 9 Contributor II
    Sure thing, there are actually some things I remember from your lessons. ;)
  • Options
    dsh_shadidsh_shadi Member Posts: 1 Contributor I
    Thank you Marius Helf,  your reply was so useful :)
Sign In or Register to comment.