简体   繁体   English

从S3复制数据到海王星实例| 需要使用SPARQL查看我的数据

[英]Copied data from S3 to Neptune instance | Need to view my data with SPARQL

I have copied data from S3 to AWS Neptune instance (4 CSV files). 我已将数据从S3复制到AWS Neptune实例(4个CSV文件)。

As per the AWS document, created RDF4 console to connect to Neptune instance. 根据AWS文档,创建了RDF4控制台以连接到Neptune实例。

In this console as per document created Neptune repository also. 在该控制台中,还根据文档创建了Neptune存储库。

Now I want see may data, how we can write the query now. 现在我想看看可能的数据,我们现在该如何编写查询。

https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-rdf4j-console.html https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-rdf4j-console.html

I have opened Neptune repository in my RDF4J console now. 我现在已经在RDF4J控制台中打开了Neptune存储库。

How to execute the SPARQL queries to check my data? 如何执行SPARQL查询以检查我的数据?

CSV is supported only for property graph (Gremlin) data [1]. 仅属性图(Gremlin)数据[1]支持CSV。 Neptune does not let you insert Gremlin data and query over SPARQL, if that's what you're trying to do. 如果您要这样做,那么Neptune不允许您插入Gremlin数据并通过SPARQL查询。

Once you bul load data using one of the supported SPARQL dta formats listed above, you can try querying in various ways (CURL requests, HTTP requests programmatically using something libraries like rdf4j, Use GUI tools like RDF4J workbench etc.). 使用上面列出的一种受支持的SPARQL dta格式加载数据后,您可以尝试以各种方式进行查询(CURL请求,使用rdf4j之类的库以编程方式进行HTTP请求,使用RDF4J Workbench之类的GUI工具等)。

The easiest way to try basic requests would be using CURL, as follows: 尝试基本请求的最简单方法是使用CURL,如下所示:

curl -X POST --data-binary 'query=select ?s ?p ?o where {?s ?p ?o} limit 10' http://your-neptune-endpoint:8182/sparql
curl -X POST --data-binary 'update=INSERT DATA { <http://test.com/s> <http://test.com/p> <http://test.com/o> . }' http://your-neptune-endpoint:8182/sparql

More Info: 更多信息:

[1] https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format.html [1] https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format.html

[2] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-http-rest.html [2] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-http-rest.html

[3] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-java.html [3] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-java.html

[4] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-rdf4j-workbench.html [4] https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-rdf4j-workbench.html

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

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