My Oracle Support Banner

SPARQL Query Default Graph (Doc ID 1669045.1)

Last updated on JANUARY 21, 2020

Applies to:

Oracle Spatial and Graph - Version and later
Information in this document applies to any platform.


With several semantic models, each with exactly one graph.
The default graphs of all the models are empty.
These models are all combined in one virtual model; and that model is published on the Joseki endpoint. This works very well.
We are able to query the union of all the graphs.

SELECT * { GRAPH ?graph {?s ?p ?o}}

However, while having ontologies in graphs has its advantages, it will also make some queries harder to write. So we would like to have the default graph be the union of all graphs.
In that way the following query would yield results despite the default graph being empty.

SELECT * { ?s ?p ?o }

This functionality corresponds to using a SEM_MATCH with the graphs and named_graphs parameters set to NULL. This is mentioned in the documentation for SEM_MATCH, in ( ) .

What we haven’t found however, is how to make this work in Joseki, so that our SPARQL endpoint behaves in the same way.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.