You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2022/03/24 13:17:51 UTC
Safe delete & insert with Fuseki
We have occasionally an issue with replace where inserting new data may
fail after old data has been deleted. What is the recommended way to do
this kind of multipart SPARQL with Fuseki (not java)? First option comes
to mind is to test if SPARQL insert is correct and WOULD be executed. Is
this possible?
Re: Safe delete & insert with Fuseki
Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Only thing I could think of is to try the insert first on some temp
graph to see if it succeed. That can be unnecessary heavy though.
On 26/03/2022 11.12, Andy Seaborne wrote:
>
> If you put all the changes in one update request, they will be done
> atomically.
>
> DELETE { ... } WHERE { ... }
> ;
> INSERT DATA { ... }
>
> Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch
> off" an operation.
>
> Andy
>
> On 24/03/2022 13:17, Mikael Pesonen wrote:
>>
>> We have occasionally an issue with replace where inserting new data
>> may fail after old data has been deleted. What is the recommended way
>> to do this kind of multipart SPARQL with Fuseki (not java)? First
>> option comes to mind is to test if SPARQL insert is correct and WOULD
>> be executed. Is this possible?
>>
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND
Re: Safe delete & insert with Fuseki
Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Queries don't have common enough selection criteria so they have to
executed separately. Otherwise that would be nice solution.
On Sat, 26 Mar 2022 at 11:12, Andy Seaborne <an...@apache.org> wrote:
>
> If you put all the changes in one update request, they will be done
> atomically.
>
> DELETE { ... } WHERE { ... }
> ;
> INSERT DATA { ... }
>
> Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch
> off" an operation.
>
> Andy
>
> On 24/03/2022 13:17, Mikael Pesonen wrote:
> >
> > We have occasionally an issue with replace where inserting new data may
> > fail after old data has been deleted. What is the recommended way to do
> > this kind of multipart SPARQL with Fuseki (not java)? First option comes
> > to mind is to test if SPARQL insert is correct and WOULD be executed. Is
> > this possible?
> >
>
Re: Safe delete & insert with Fuseki
Posted by Andy Seaborne <an...@apache.org>.
If you put all the changes in one update request, they will be done
atomically.
DELETE { ... } WHERE { ... }
;
INSERT DATA { ... }
Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch
off" an operation.
Andy
On 24/03/2022 13:17, Mikael Pesonen wrote:
>
> We have occasionally an issue with replace where inserting new data may
> fail after old data has been deleted. What is the recommended way to do
> this kind of multipart SPARQL with Fuseki (not java)? First option comes
> to mind is to test if SPARQL insert is correct and WOULD be executed. Is
> this possible?
>