Hi folks!
# spicedb
w
Hi folks! Wrt the Watch api - given the changes_through zed token can be used as a cursor to pickup where you left off - is it correct to assume it can be used as a unique identifier for a particular response (batch of updates)?
y
yes, on some level a zedtoken is a revision identifier. what's the use case, though?
w
I'm looking to sink relationship changes from spicedb to an external source and potentially trigger some workflows for some batches/transactions. Final destination of the sink would be row <> update. Wanted to confirm grouping by zed token would allow me to "reconstruct" the original update batch. Also wanted to confirm that I could use the zed token as a unique id of a workflow (prevent duplicate workflows for a batch).
y
ah, then yes and yes. we also have a
transaction_metadata
field on
WriteRelationships
that comes through
Watch
that you can use if you need to correlate things with those transactions as they come through. at my old job we had plans to use
transaction_metadata
for audit functionality
w
Perfect thanks so much - and yep totally. Using it currently for things like user, correlation ids etc. that will be included in my sink destination
5 Views