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?

demandé il y a 4 ans371 vues
2 réponses
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

répondu il y a 4 ans
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
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions