does ory keto check duplicate tuple , while creati...
# ory-selfhosting
l
does ory keto check duplicate tuple , while creating tuple?
w
I just ran in to this yesterday. As far as I can tell, no keto doesn't prevent duplicate relationship tuples from being created. I confirmed this in both the CLI and the python SDK. ``````
👍 1
I don't know if this is the preferred way, but I ended up writing a little helper function that check if the to-be-created tuple passes a
keto check
-- if that's denied, then I create the tuple, otherwise skip. Maybe this'll come back to bite me later, but I'll try it out for now.
l
But, , if we are creating tuples using Patch api /admin/relation_tuples for bulk creating, or even using create api one by one ,we should have to check each one's exist check individually.. It may leads to performance issue, if we have to create huge number of tuples
w
> It may leads to performance issue, if we have to create huge number of tuples Yeah, for sure -- I'm not nearly versed enough with Keto to have thoughts on bulk tuple creation and duplicate detection