Thank you for the response, Pedro.  However it seems to me that I am already 
applying the approach you reference in the page.  See lines 35-37 int the 
config file I included.  Perhaps I am applying it wrong?  If so, where am I 
going wrong?

-- Scott

From: Pedro <pedro.win.s...@googlemail.com.INVALID>
Sent: Tuesday, July 23, 2024 4:35 PM
To: users@jena.apache.org
Subject: [EXTERNAL] Re: Using Fuseki to query the union of datasets

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi Scott

Look at the TDB and TDB2 examples in
https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html<https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html>

Uncomment the line

tdb:unionDefaultGraph true;

Cheers!

On Tue, 23 Jul 2024, 22:29 Scott Henninger, 
<scott.hennin...@ecstech.com<mailto:scott.hennin...@ecstech.com>>
wrote:

> I am attempting to use Fuseki to query the union of a set of datasets. I
> am using the following configuration to define a TDB dataset named
> "union-graph" and setting tdb:unionDefaultGraph to true to query the union
> of the datasets. However when I query "union-graph" I do not see the
> triples from the datasets I have populated. How can I configure Fuseki to
> query the union of datasets?
>
> Thank you
> -- Scott
>
> @prefix : <#> .
> @prefix fuseki: 
> <http://jena.apache.org/fuseki#<http://jena.apache.org/fuseki#>> .
> @prefix rdf: 
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
>  .
>
> @prefix rdfs: 
> <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
>  .
> @prefix tdb: 
> <http://jena.hpl.hp.com/2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>> .
> @prefix ja: 
> <http://jena.hpl.hp.com/2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
>  .
>
> [] rdf:type fuseki:Server ;
> fuseki:services (
> :service1
> ) .
>
> # Custom code.
> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>
> # TDB
> tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
> tdb:GraphTDB rdfs:subClassOf ja:Model .
>
> :service1 rdf:type fuseki:Service ;
> fuseki:name "union-graph" ;
> fuseki:serviceQuery "sparql" ;
> fuseki:dataset :dataset ;
> .
>
> :dataset rdf:type ja:RDFDataset ;
> ja:defaultGraph :model_default ;
> .
>
> :model_default a ja:InfModel ;
> ja:baseModel :tdbGraph ;
> .
>
> :tdbDataset rdf:type tdb:DatasetTDB ;
> tdb:location "DB" ;
> tdb:unionDefaultGraph true ;
> .
>
> :tdbGraph rdf:type tdb:GraphTDB ;
> tdb:dataset :tdbDataset ;
> .
>
>

Reply via email to