0

I have two different tables with measured values in KNIME. Both contain different measured values of the same object and their specific Time-Stamps. I want to combine them by time. Variable1 has about 5.000 observations. Variable2 about 300.000 observations. I want to combine Variable1 with the Variable2, and minimize the time-difference. My maximum possible time-difference is 180 seconds. Any suggestions?

My idea is to use the cross-joiner node. Where each row of the first table is joined with each row of the second table and then use time-diff node and so on. This solutions takes a lot of time, since the operation is very expensive. Is there a better way? In KNIME or R or JAVA. Doesn't matter.

Do I have to compare each value to the other?

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
ASAP_7
  • 33
  • 2
  • 7
  • Probably I would sort both tables by their time-stamps. Create two new columns for one of the tables, by averaging with the next/previous and the current row time stamp. Using this table you can find the other table's rows by filtering and creating a collection within a loop. Based on that, you will be able to `Unpivoting` and join them. I guess this might work. (With R it might be faster/easier.) – Gábor Bakos May 05 '15 at 09:59
  • I did find a solution. I put them together in one table and ordered by them by time. Then generated a ranking-number based on the time. In a loop i searched for a line containing Variable1 (since there are less observations) and then checked if the lines above or underneath contain Variable 2 and where time_diff is minimal. So i get the minimum time difference between the Variables. Works fine and fast. – ASAP_7 May 06 '15 at 09:21

0 Answers0