简体   繁体   English

AWS Neptune 无法加载单一基数

[英]AWS Neptune unable to load with Single cardinality

I'm encountering an issue with the Neptune loader and as far as I can see I'm following the documentation correctly but I can't get the Neptune Loader to load vertex information from CSVs correctly.我遇到了 Neptune 加载器的问题,据我所知,我正确地遵循了文档,但我无法让 Neptune 加载器正确地从 CSV 加载顶点信息。

Gremlin Neptune CSV Loader format Gremlin Neptune CSV 装载机格式

I'm using the latest version of Neptune and I'm setting the column data type and cardinality correctly but for some reason Neptune considers that all the properties on the loaded vertexes are SETs.我使用的是最新版本的 Neptune,我正在正确设置列数据类型和基数,但出于某种原因,Neptune 认为加载的顶点上的所有属性都是 SET。 Edge information is loaded correctly.正确加载边缘信息。

Please see below an example of how the headers/data look like.请参阅下面的标题/数据外观示例。 I've also tried quoting the headers and fields but to no avail.我也试过引用标题和字段但无济于事。 All the properties on the created vertexes are SETs.创建的顶点上的所有属性都是 SET。

在此处输入图像描述

As you can see below the loaded data does not have SINGLE cardinality.正如您在下面看到的,加载的数据没有单一基数。

在此处输入图像描述

Any ideas on how to convince Neptune to load data with the correct cardinality?关于如何说服海王星以正确的基数加载数据有什么想法吗?

By default Apache TinkerPop returns values in a valueMap as lists even if the cardinality is single.默认情况下 Apache TinkerPop 将valueMap中的值作为列表返回,即使基数是单一的也是如此。 If you want to get rid of the list syntax you can do valueMap().by(unfold())如果你想摆脱列表语法,你可以做valueMap().by(unfold())

Edited to add text below:编辑以在下面添加文本:

If some of the values really are sets of values then you can selectively unfold only the ones that are not as in如果某些值确实是值集,那么您可以有选择地仅展开那些不像

gV('1').valueMap('myset','myint').by().by(unfold())

There are more examples here: http://tinkerpop.apache.org/docs/current/reference/#valuemap-step这里有更多例子: http://tinkerpop.apache.org/docs/current/reference/#valuemap-step

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

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