-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First and last seen event #4641
Conversation
(cherry picked from commit 55c468218e23b9c56dacdc107fe5bae10acf2d09)
@EDsCODE I don't have clickhouse on my computer I might need some help with the clickhouse version of this even though it seems pretty straightforward 🤔 |
I wonder if it wouldn't be better in the long run if we add Saying this because it might be especially costly with Clickhouse to go back to the beginning of your billions of events, and find the first occurrence of something. Or it might not be, I don't know to be honest :). |
Was about to suggest this because the first seen timestamp will never change so we don't need to keep calculating it Does the last seen timestamp need to be completely up to date? |
Yes I think the last seen timestamp should also be completely up to date. This would still be updated on the plugin-server, correct? Seems like all I should do here is just add those fields to the event definition model instead of this then |
There are a few complexities here:
Nothing some code won't fix though :) |
Seems like this will change based on Eric's & Marius's feedback. Tag me if you need another review 😉 |
Closing while I update |
Changes
Return the first/last seen event with
last_seen=true
orfirst_seen=true
for #4267url example:
?properties=%7B%7D&event=watched_movie&orderBy=%5B"timestamp"%5D&last_seen=true
Checklist