Neptune overwrites blank node values when inserting data

0

When inserting a triple with a blank node into an Amazon Neptune instance:

INSERT DATA { <http://example.com/s> <http://example.com/p> _:something }

…the blank node's value gets replaced with b<SOME NUMBER>. Running a query like this:

SELECT ?o WHERE { <http://example.com/s> <http://example.com/p> ?o }

…will return something like this:

{
    "results": {
        "bindings": [
            {
                "o": {
                    "type": "bnode",
                    "value": "b24508943"
                }
            }
        ]
    }
}

Is there a way to retain original blank node names when loading data into Neptune?

已提问 4 年前371 查看次数
2 回答
0

That is by RDF design:

Blank node identifiers are local identifiers that are used in some concrete RDF syntaxes or RDF store implementations. They are always locally scoped to the file or RDF store, and are not persistent or portable identifiers for blank nodes.

https://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#section-blank-nodes

已回答 4 年前
0

The idea of blank nodes is that they are not addressable (from "outside"). If you need something you can address (i.e., "point to") later, you should give it a URI.

If you have a blank node that serves as the subject of some statements, you might be able to find those statements if some other statement uses that blank node as well (e.g., as its object). That is, you could use a query to find them. Otherwise, use a URI.

AWS
Ora_L
已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则