You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2016/10/08 16:35:20 UTC
[jira] [Comment Edited] (JENA-1242) SPARQL update: delete a triple
fails silently on named graph file:/XX
[ https://issues.apache.org/jira/browse/JENA-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15558267#comment-15558267 ]
Andy Seaborne edited comment on JENA-1242 at 10/8/16 4:34 PM:
--------------------------------------------------------------
What is happening is that the data has a relative URI in it but SPARQL parsing resolves relative URIs so that there is no match.
Try this:
{noformat}
arq.uparse 'WITH <file:XX> DELETE {} WHERE{}'
{noformat}
and get
{noformat}
WITH <file:///home/afs/tmp/XX>
DELETE { }
WHERE
{ }
{noformat}
The {{WITH}} URI has been resolved.
{noformat}
riot triple_to_remove.nq
{noformat}
can be used to check data before loading. This is generally a good idea because parsing is much faster than loading.A problem with the data during a load invalidates the load but it is not transactional (for speed).
was (Author: andy.seaborne):
What is happening is that the data has a relative URI in it but SPARQL parsing resolves relative URIs so that there is no match.
Try this:
arq.uparse 'WITH <file:XX> DELETE {} WHERE{}'
and get
{noformat}
WITH <file:///home/afs/tmp/XX>
DELETE { }
WHERE
{ }
{noformat}
The {{WITH}} URI has been resolved.
riot triple_to_remove.nq
can be used to check data before loading. This is generally a good idea because parsing is much faster than loading.A problem with the data during a load invalidates the load but it is not transactional (for speed).
> SPARQL update: delete a triple fails silently on named graph file:/XX
> ---------------------------------------------------------------------
>
> Key: JENA-1242
> URL: https://issues.apache.org/jira/browse/JENA-1242
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Environment: $ uname -a
> Linux jmv-SMBIOSation 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> $ java -version
> openjdk version "1.8.0_91"
> OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
> OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
> $ which java
> /usr/bin/java
> Reporter: Jean-Marc Vanel
>
> Delete with SPARQL update a quad in named graph <file:/XX> does not delete anything.
> HOW TO REPRODUCE
> Tested on latest source in github:
> {noformat}
> cd jena-cmds
> echo '<urn:s> <urn:p> "o" <file:XX> .' > triple_to_remove.nq
> echo 'WITH <file:XX> DELETE {<urn:s> <urn:p> ?O} WHERE {<urn:s> <urn:p> ?O} ' \
> > update.rq
> mvn exec:java -Dexec.mainClass="tdb.tdbloader" \
> -Dexec.args="--verbose --loc=TDB triple_to_remove.nq"
> mvn exec:java -Dexec.mainClass="tdb.tdbupdate" \
> -Dexec.args="--verbose --loc=TDB --update=update.rq"
> mvn exec:java -Dexec.mainClass="tdb.tdbdump" \
> -Dexec.args="--verbose --loc=TDB" 1> /tmp/dump.nq
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)