On 16/11/2023 11:35, Laura Morales wrote:
I would like to configure Fuseki such that I can use 2 datasets from 2
different locations, as if they were a single dataset.
This is my config.ttl:
<#> a fuseki:Service ;
fuseki:endpoint [
fuseki:operation fuseki:query
] ;
fuseki:dataset [
a ja:RDFDataset ;
ja:namedGraph [
ja:graphName :graph1 ;
ja:graph [
a tdb2:GraphTDB ;
tdb2:location "location-1" ;
]
] ;
ja:namedGraph [
ja:graphName :graph2 ;
ja:graph [
a tdb2:GraphTDB ;
tdb2:location "location-2" ;
]
] ;
] .
There is no particular reason why I used this configuration; I mostly copied it
from the Fuseki documentation. If it can be simplified, please suggest how.
I query Fuseki with "/service/query/?default-graph-uri=urn:x-arq:UnionGraph". I also know that I can use
"SELECT FROM <urn:x-arq:UnionGraph>". But I would like to know if I can configure this behavior as
the default in the main configuration file, such that I can avoid using "x-arq:UnionGraph" entirely.
Both datasets are TDB2 and contain triples only in the default unnamed graph
(in other words do not contain any named graph inside).
I can't find a way to do that.
tdb2:unionDefaultGraph applies to a single datasets and you have two
datasets.
Using
ja:defaultGraph [
a ja:Model;
ja:subModel ...
ja:subModel ...
] ;
falls foul of transaction coordination across two different models (even
if they are views of the same database).
I though that would work - there is some attempt to extend transactions
into graph but this seems to be pushing things too far.
Andy