0

I'm looking to get more data back in my jupyter visualization on Neptune than just Node ID

g.V("specific-id").emit().repeat(both().simplePath()).dedup().out().path().by(T.id)

In particular, it would be nice to know the label as well and maybe any other information. How can I modify this above query to achieve that?

Ryan
  • 1,102
  • 1
  • 15
  • 30

1 Answers1

0

You could do a number of things because the by() modulator on path() can take a Traversal. An easy one would be to just do elementMap() or valueMap() as in:

g.V("specific-id").
  emit().repeat(both().simplePath()).
  dedup().
  out().
  path().by(valueMap())
stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Thanks for the reply. We've tried a few things like this and this query as well, but seeing {'error': TypeError("unhashable type: 'dict'",)} – Ryan Sep 29 '21 at 19:30
  • That sounds like the Python client complaining. This is fixed in TinkerPop 3.5 I believe (from memory) where the client now converts any dict keys into immutable tuples. Which Python client are you using? Also are you using your own code with Jupyter or the Neptune notebook magics? The notebooks already have the fix to convert complex keys to tuples. – Kelvin Lawrence Sep 29 '21 at 20:21