Hey folks, is there a way to get relation tuples i...
# talk-keto
v
Hey folks, is there a way to get relation tuples in the "human readable" form? I see there is a parse function, but I was looking for the opposite of it! Or a way to get a dump of all relationships in Keto's database in the documentation format To use with the ketodot tool, it only works with relationships in the
group:0#member@user:0
format
c
try this:
Copy code
keto relation-tuple get --format json --insecure-disable-transport-security | jq -r '
   .relation_tuples[] | 
   "\(.namespace):\(.object)#\(.relation)@\(
     if (.subject_set != null) then 
       "\(.subject_set.namespace):\(.subject_set.object)\(
         if (.subject_set.relation != "") then 
           "#\(.subject_set.relation)"
         else 
           ""
         end
       )" 
     else 
       .subject_id
     end
   )"
 '