🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Generate new Attributes with some calculations

User: "Gopal_Desai"
New Altair Community Member
Updated by Jocelyn

Hello everyone,

 

I am new here and i don't have that much experience in Rapidminer. I have one Table in MySQL Database and i connected my Database with Rapidminer via MySQL. I get table from Database in Rapidminer like this. As you can see in Photo. Column 2, It shows Time when object comes on station. For example in First Row, Object 4B6B831A comes on station Arbeitsplatz1 at 04.03.20 13:49:29. When This Object leave the station(As you see in Row 2),It shows Wert=0 on station Arbeitsplatz1 at 04.03.20 13:49:41. Now I would like to add new Column (Process Time), It should Calculate time difference between 2nd Row and 1st Row. And it should show me in column(Process Time), 

Same thing for ID(Column 1) 10 and 12. It should show me timestamp difference in new Column (Process Time).

I don't know how to calculate this thing every time, Whenever values has been added in Table. If anyone know could you please help me out.

Thank you in advance

 

Best Regards,

Gopal Desai     

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "lionelderkrikor"
    New Altair Community Member
    Accepted Answer
    Updated by lionelderkrikor
    Hi Gopal,

    You can use the Lag operator (with lag = 1) on the timestamp attribute.
    Please see the tutorial of this operator to understand how it works.
    Then use the date_diff() function in the Generate Attributes operator.


    EDIT : 

    I misunderstood what you want to do. If I good understand, you want for each object calculate
    the duration between the arrival in Arbeitplatz-i and departure from arbeitplatz-i with i = 1,2,3 etc. ?
    I don't see a priori a RapidMiner native solution, maybe it is feasible with a Python script. 



    Regards,

    Lionel