On 11/09/2019 16:28, Laura Morales wrote:
Presumably this is more than one TDB database.

yes, a few 10s

What works is when graphs are in the same database.

this is not easy for me to switch to. My problem is that I'm pulling multiple 
sources (RDF) from different places, and I want all of them together to be my 
default graph. If I create a single dataset, every time I update one source I 
have to re-upload the whole thing even if the source that I've updated is only 
a few MB. Graphs are also updated frequently. With separate datasets, I can 
download/update only one dataset and upload much less data.

What might be better is define the ja:RDFDataset to have the graphs,
then query the union graph of the dataset. But that again is crossing
multiple transaction systems so may not work.

Right now I have a RDFDataset with a UnionModel like this

     :dataset a ja:RDFDataset ;
         ja:defaultGraph :union ;

     :union a ja:UnionModel ;
         ja:subModel :graph1 ;
         ja:subModel :graph2 ;
         ja:subModel :graph3 ;

how wouldl I "give" the graphs to the RDFDataset directly?

I think it is :

:dataset a ja:RDFDataset ;
  ja:namedGraph [ ja:graphName "http;//example/name" ;
                  ja:graph :graph1 ] ;
  ja:namedGraph ...

Or is there maybe a different way to address my problem (updating graphs 
independently so that I don't have to upload the whole lot every time)?

The s-* scripts let you replace whole graphs and can be do that when the server is running. s-put is replace the contents one graph. That should mean TDB2 can be used - set union mode on the dataset or (3.13.0) the service for default to query all graphs.

Per query, use GRAPH <urn:x-arq:UnionGraph>
(or FROM -- GRAPH is better).

Or protocol:
(with the usual getting escapes/encoding right for curl)

and current s-query knows about "?" already in the URL:

s-query --service \
   'http://localhost:3030/ds/?default-graph-uri=urn:x-arq:UnionGraph' \
 'SELECT * { ?s ?p ?o }'


Reply via email to