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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南