#cboebel

1 messages · Page 1 of 1 (latest)

lyric bearBOT
heavy laurel
#

Good question, checking..

#

Can you say more about

If I retrieve events (say a few thousand) filtered for a few event types, will I receive those events in order of their original creation?
Are there any specific events you're looking at?

rugged trellis
#

I’m writing something to sync data from Stripe with my Snowflake DB. Yes, I know there are commercial options. We even use one. Call it an intellectual exercise.

Anyhow, my issue is that event creation times are not granular enough to sort by them. For example, I have these two events. Both are customer.updated, and both came in when I retrieved 100 events with the same time stamp:

evt_1Nj6UHEWcGtkD3zat2a6DQ2c & evt_1Nj6UGEWcGtkD3zaAvBA9uyF

#

My problem is that unless I know which order they happened in, I could update the underlying record in the wrong order.

#

.. and when I say not granular enough, the time does not come in with milliseconds, so the times are rounded to the nearest second. Or truncated. One of those.

heavy laurel
#

Hmm I've looked, we never guarantee order of the events as they're generated asynchronously.

This could be like an edge case where both events for the same customer share the same created timestamp.

rugged trellis
#

Right, but this is not a web hook case. I’m pulling events after they’ve happened. Not guaranteed even then?

And follow up question: Is it possible to receive time stamps with milliseconds?

heavy laurel
#

Not guaranteed even then?
As far as I know, they're sorted by the timestamps

And follow up question: Is it possible to receive time stamps with milliseconds?
Not really, the API can only return Unix timestamp (which upto the nearest second)

rugged trellis
#

Interesting. OK. Thank you. I appreciate your help.