简体   繁体   中英

Getting more data on Gremlin traversal than just node id?

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?

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())

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM