Extract only first record sort by timestamp for each ID

Hi everyone!
I need to extract only the first record for each ID which contains the first timestamp…

eXAMPLE:
I need only yellow records. How can I do that?
image

Thanks!

Hi @giad

This can be easily done using the GroupBy node grouping by -ID- and aggregating by -TIMESTAMP- with operation -First-

This should do the trick :wink:

Hope this helps.

Best,

Ael

6 Likes

@giad another option would be to use the:

Advanced settings:

6 Likes

Many thanks. It works…
If I need to keep only grey rows in the image below, how can I do that?

image
I need to keep only the status changes record immediately after a commands…all other data are not necessary.

Many thanks
Giada

Hello @giad,

think Lag Column node (on source column) followed by Rule-based Row Filter node (to apply your logic) should do the trick.

Br,
Ivan

4 Likes

Thanks @Ipazin
But I need only the status changes immediately after a command.
How can i exclude all other status without a command before?

Giad

Hi @giad

I have the impression that @ipazin’s last answer does the job. Would it be possible for you to post here a copy & paste of your data example instead of (or additionally to) the screen snapshot please ? It would help us to provide you with the exact answer.

Thanks & regards,

Ael

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.