On 18/11/2023 08:21, Laura Morales wrote:
I've tried this option too using the following configuration
fuseki:dataset [
a ja:RDFDataset;
ja:defaultGraph [
a ja:UnionModel ;
ja:subModel [
a tdb2:GraphTDB2 ;
tdb2:dataset [
a tdb2:DatasetTDB2 ;
tdb2:location "location1"
]
] ;
ja:subModel [
a tdb2:GraphTDB2 ;
tdb2:dataset [
a tdb2:DatasetTDB2 ;
tdb2:location "location2"
]
] ;
]
]
but it always gives me "transaction error" with any query. I've tried TDB 1
instead, but it gives me a different error:
ERROR Server :: Exception in initialization: the (group) Assembler
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup@b73433
cannot construct the object [...] [ja:subModel of [...] [ja:defaultGraph of
[...] ]] because it does not have an implementation for the objects's most
specific type ja:Model
I've found a couple of old threads online with people reporting "MultiUnion" as
working, but I don't know how to use this configuration. I couldn't find it on the Fuseki
documentation and simply replacing ja:UnionModel for ja:MultiUnionModel doesn't make any
difference for me.
Do you know anything about this MultiUnion and if it could work?
Only with use of default-graph-uri or SELECT FROM.
Having a dadaset description in the request itself causes the processor
to have a per-request dataset with a java class GraphUnionRead as the
default graph. GraphUnionRead copes with the transaction setup across
the two locations.
As things stand at the moment, other ways of constructing a suitable
dataset don't use GraphUnionRead.
Using a service name of
"/service/query/?default-graph-uri=urn:x-arq:UnionGraph".
Tools generally cope with query string in the URL and correctly assmble
the URL:
Java:
QueryExecution qExec =
QueryExecutionHTTP
.service("http://localhost:3030/ds/?default-graph-uri=urn:x-arq:UnionGraph")
.query("SELECT * { ?s ?p ?o}")
.build();
or
curl -d 'query=SELECT * {?s ?p ?o}'
'http://localhost:3030/ds/?default-graph-uri=urn:x-arq:UnionGraph'
Andy