简体   繁体   English

获取更多关于 Gremlin 遍历的数据而不仅仅是节点 ID?

[英]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我希望在 Neptune 上的 jupyter 可视化中获得更多数据,而不仅仅是节点 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.特别是,最好知道 label 以及任何其他信息。 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 .您可以做很多事情,因为path()上的by()调制器可以采用Traversal An easy one would be to just do elementMap() or valueMap() as in:一个简单的方法是只执行elementMap()valueMap() ,如下所示:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Gremlin 中查找异常值以查找具有多于 N 条边的节点? - Finding outliers in Gremlin to find nodes with more than N edges? getDocuments() 函数多次获取相同的数据 - getDocuments() function getting the same data more than one time 如何创建一个新表,只保留Bigquery中相同ID下超过5条数据记录的行 - How to create a new table that only keeps rows with more than 5 data records under the same id in Bigquery Gremlin 加载数据格式 - Gremlin load data format 在添加或更新边缘时出现错误“未匿名生成 - 使用 __ class 而不是 TraversalSource”(在 Neptune 中使用 gremlin) - Getting Error "not spawned anonymously - use the __ class rather than a TraversalSource " while adding or updating the edge(in Neptune using gremlin) Firebase 获取要删除/更新的特定节点的 ID - Firebase getting ID for specific node to delete/update 将更多数据推送到相同的文档 ID - Pushing more data to the same document id 删除 ID 在 Redshift 中多次存在的行 - Delete rows where ID exists more than once in Redshift Gremlin with Neptune:如何处理 Vertex ID 更新? - Gremlin with Neptune: How to handle Vertex ID updates? Gremlin - 从 valueMap 中提取 T.id 和 T.label - Gremlin - extracting T.id and T.label from valueMap
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM