Search code examples
graphdbblank-nodes

Preserve blank node identifiers in SPARQL results download


When I download the result of a SPARQL query in GraphDB 10.7.6 in N-Quad or N-Triples formats, the blank nodes are renamed with a generic _:genid prefix.

Is is possible to preserve blank node identifiers in SPARQL results downloads in N-Quad or N-Triples formats?


Solution

  • In RDF4J, blank node identifiers (bnode IDs) are not preserved during export because they are scoped to the dataset or repository and may be regenerated or renamed for serialization. GraphDB, which extends RDF4J, inherits this behavior. Therefore, when exporting SPARQL query results in N-Quad or N-Triples formats, blank nodes are typically assigned new identifiers (e.g., _:genid).

    If you're specifically using GraphDB 10.7.6, the behavior described matches the default handling of blank nodes in SPARQL result downloads.