Discussion:
Fuseki backup includes inferred triples
Brad Stallion
2018-11-30 11:21:46 UTC
Permalink
Hi All,I'm using Fuseki 3.9.0. I enabled the following reasoner in my assembly file:
...   ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
I've noted that doing a backup using Fuseki API (http://localhost:3030/$/backup/dataset or from web UI) the generated file includes inferred triples.After restoring such backup inferred relations are now asserted relations, which is not correct.So here's my questions:
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
ajs6f
2018-11-30 11:26:26 UTC
Permalink
As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)

Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.

ajs6f

[1] https://www.w3.org/TR/sparql11-http-rdf-update
... ja:reasoner [ ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
Brad Stallion
2018-11-30 11:52:26 UTC
Permalink
Hi, thanks. I have no idea about how to segregate asserted/inferred triples in separate graphs!
Il venerdì 30 novembre 2018, 12:33:48 CET, ajs6f <***@apache.org> ha scritto:

As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)

Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.

ajs6f

[1] https://www.w3.org/TR/sparql11-http-rdf-update
...  ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
Andy Seaborne
2018-11-30 14:44:58 UTC
Permalink
You could setup anothe fuseki:Service that uses the same dataset
<#tdbDataset>, define query and GSP read access for that service, then
backup by doing an HTTP get on that name "http://...:3030/myData" (with
content negotation for format). It should be the shared base data.

<#tdb> rdf:type fuseki:Service ;
fuseki:name "myData" ;
fuseki:serviceQuery "sparql" ;
fuseki:dataset <#tdbDataset> ;
rdfs:label "base data" ;
fuseki:serviceReadGraphStore "get" ;
.

Andy
Post by Brad Stallion
Hi, thanks. I have no idea about how to segregate asserted/inferred triples in separate graphs!
As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)
Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.
ajs6f
[1] https://www.w3.org/TR/sparql11-http-rdf-update
...  ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
Brad Stallion
2018-11-30 15:49:00 UTC
Permalink
Thanks Andy. I'll try it.What about my second question? is it possible to disable/enable the reasoner on the fly?Thanks Il venerdì 30 novembre 2018, 15:45:05 CET, Andy Seaborne <***@apache.org> ha scritto:

You could setup anothe fuseki:Service that uses the same dataset
<#tdbDataset>, define query and GSP read access for that service, then
backup by doing an HTTP get on that name "http://...:3030/myData" (with
content negotation for format). It should be the shared base  data.

<#tdb> rdf:type fuseki:Service ;
  fuseki:name "myData" ;
  fuseki:serviceQuery          "sparql" ;
  fuseki:dataset                <#tdbDataset> ;
  rdfs:label                    "base data" ;
  fuseki:serviceReadGraphStore  "get" ;
  .

    Andy
  Hi, thanks. I have no idea about how to segregate asserted/inferred triples in separate graphs!
 
  As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)
Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.
ajs6f
[1] https://www.w3.org/TR/sparql11-http-rdf-update
...  ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
   
Andy Seaborne
2018-11-30 18:18:52 UTC
Permalink
There isn't a way to disable it - what I described bypasses the reasoner
to get the non-inferred data.

Andy
Post by Andy Seaborne
You could setup anothe fuseki:Service that uses the same dataset
<#tdbDataset>, define query and GSP read access for that service, then
backup by doing an HTTP get on that name "http://...:3030/myData" (with
content negotation for format). It should be the shared base  data.
<#tdb> rdf:type fuseki:Service ;
  fuseki:name "myData" ;
  fuseki:serviceQuery          "sparql" ;
  fuseki:dataset                <#tdbDataset> ;
  rdfs:label                    "base data" ;
  fuseki:serviceReadGraphStore  "get" ;
  .
    Andy
  Hi, thanks. I have no idea about how to segregate asserted/inferred triples in separate graphs!
  As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)
Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.
ajs6f
[1] https://www.w3.org/TR/sparql11-http-rdf-update
...  ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
Brad Stallion
2018-12-03 15:17:55 UTC
Permalink
Ciao Andy,it works! Thanks a lot!
Il venerdì 30 novembre 2018, 15:45:05 CET, Andy Seaborne <***@apache.org> ha scritto:

You could setup anothe fuseki:Service that uses the same dataset
<#tdbDataset>, define query and GSP read access for that service, then
backup by doing an HTTP get on that name "http://...:3030/myData" (with
content negotation for format). It should be the shared base  data.

<#tdb> rdf:type fuseki:Service ;
  fuseki:name "myData" ;
  fuseki:serviceQuery          "sparql" ;
  fuseki:dataset                <#tdbDataset> ;
  rdfs:label                    "base data" ;
  fuseki:serviceReadGraphStore  "get" ;
  .

    Andy
  Hi, thanks. I have no idea about how to segregate asserted/inferred triples in separate graphs!
 
  As I understand it, the backup function just copies triples from the dataset to the file-- it has no way of understanding their provenance. (But I stand to be corrected-- I was pretty far off in my advice to you about trying DROP GRAPH earlier!)
Is it possible for you to change your assembly to segregate your asserted and inferred triples in separate graphs within the dataset? If so, perhaps you could use SPARQL Graph Store Protocol [1] to download only those graphs you want to backup.
ajs6f
[1] https://www.w3.org/TR/sparql11-http-rdf-update
...  ja:reasoner  [ ja:reasonerURL  <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>] .
1) is there a way to instruct backup to not include inferred triples?2) if not, is it possible to disable/enable the reasoner on the fly? In this way I could disable the reasoner, make the backup, re-enable the reasoner
Thanks a lot
   
Loading...