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?

asked 4 years ago362 views
2 Answers
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

answered 4 years ago
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
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions