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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠