Youngsol Koh
03/22/2024, 8:59 AMJohn Kowtko
03/22/2024, 2:57 PMYoungsol Koh
03/22/2024, 3:11 PMAlso, pay attention to late arrival data ... if most of your ingested data has a timestamp of today, but there are a small number of events coming in for prior time intervals, then the ingestion tasks will create separate (and small) segments for those bits of data in the prior time intervals.In my case, this is the case. How to deal with late arrival data? sometimes, month late data will come due to its domain nature.
Amatya Avadhanula
03/23/2024, 5:38 PMYoungsol Koh
03/25/2024, 6:11 AM__time as approved_ts as key.
Deduplication process is done by windowing query. event_sent_at is secondary timestamp.
Something looks like below.
group by. __tiime
window partitioned by ( transaction_id order by event_sent_at asc)Amatya Avadhanula
03/25/2024, 6:31 AM__time , ingest approved_ts , event_sent_at as they are, and change your query to:
group by approved_ts
window partitioned by ( transaction_id order by event_sent_at asc)Amatya Avadhanula
03/25/2024, 6:33 AMYoungsol Koh
03/25/2024, 6:41 AMgroup by approved_ts
window partitioned by ( transaction_id order by event_sent_at asc)
but it should work but I am worried that it will scan all the segments, since we do not know the ingestion time( in case of canceled transaction)Youngsol Koh
03/25/2024, 6:41 AMevent_sent_at is the kafka.timestamp btw.Amatya Avadhanula
03/26/2024, 4:20 AMbut it should work but I am worried that it will scan all the segments,If you were to set
event_sent_at as __time
And ingest approved_ts as a separate column, would you still have to scan all the segments?Amatya Avadhanula
03/26/2024, 4:20 AMYoungsol Koh
03/26/2024, 5:35 AMevent_sent_at as __time, in order to user LATEST/EARLIEST windowing function to work properly, i have to add __time between current_timestamp - INTERVAL ‘5’ years and current_timestamp to group by approved_ts.Amatya Avadhanula
03/28/2024, 3:29 AMAmatya Avadhanula
03/28/2024, 3:30 AMeven if segment granularity is day. I see a lot of small segments.Was the original segment granularity DAY or did you change HOUR to DAY recently?
Youngsol Koh
03/28/2024, 3:32 AM