Are arbitrary INSERT
's supported?
#1697
-
Greetings, I do the following steps to reproduce the exception # create a directory
mkdir qlever-insert-test && cd qlever-insert-test
# pull latest qlever image
docker pull adfreiburg/qlever:latest
# start an interactive qlever container
docker run -it --rm -u $(id -u):$(id -g) -p 8888:8888 -v $(pwd):/data -w /data adfreiburg/qlever:latest Now inside the container: # add a default Qleverfile
qlever setup-config default And either inside the container shell or on the host, use your favourite $EDITOR to modify the
Create a file
Returning to the interactive shell inside the container: qlever index
qlever start
qlever log So the container shell is now following the server logs and I do this in another terminal window on the host machine: # now we're able to query
curl localhost:8888/ --data-urlencode 'query=SELECT ?subject ?name WHERE { ?subject <http://example.org/predicate/name> ?name }'
# result =>
# {"head":{"vars":["subject","name"]},"results":{"bindings":[{"subject":{"type":"uri","value":"http://example.org/subject/me"},"name":{"type":"literal","value":"Me!","xml:lang":"en"}}]}}
# fetch the access token from Qleverfile
export ACCESS_TOKEN=$(grep '^ACCESS_TOKEN' Qleverfile | awk '{print $3}')
# insert data
curl localhost:8888/ --data-urlencode 'update=INSERT DATA { <http://example.org/subject/you> <http://example.org/predicate/name> "You!"@en }' --data-urlencode "access-token=$ACCESS_TOKEN"
# result =>
# Update successful
# query again
curl localhost:8888/ --data-urlencode 'query=SELECT ?subject ?name WHERE { ?subject <http://example.org/predicate/name> ?name }'
# result =>
# {
# "exception": "Assertion `blocks.size() <= 1` failed. Should only be called for small relations. Please report this to the developers. In file \"/qlever/src/index/CompressedRelation.cpp \" at line 1513",
# "query": "SELECT ?subject ?name WHERE { ?subject <http://example.org/predicate/name> ?name }",
# "resultsize": 0,
# "status": "ERROR",
# "time": {
# "computeResult": 2,
# "total": 2
# }
#} The shell with
Image: docker image ls adfreiburg/qlever
#REPOSITORY TAG IMAGE ID CREATED SIZE
#adfreiburg/qlever latest 30b1bbb026ac 2 weeks ago 641MB Also environment info, although I don't think it's relevant here: docker --version
#Docker version 27.4.0, build bde2b89
system_profiler SPSoftwareDataType SPHardwareDataType
#Software:
# System Software Overview:
# System Version: macOS 15.2 (24C101)
# Kernel Version: Darwin 24.2.0 So the following two questions arise:
Relevant links: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This works for us:
|
Beta Was this translation helpful? Give feedback.
-
@SamuelSarle Very sorry for the late answer. @1: QLever does support the insertion of triples or quads with arbitrary literals and IRIs, and not only those that were already contained in the original input data (which would be very limiting). It seems you have hit a bug and we will try to fix it next week (this week is super busy). Please remind us in due time in case we forget. According to a preliminary investigation: the bug should only occur for small data or when using a literal or IRI that is very rare in the original input, and even then only in special cases. @2: Updates are not persistent yet. It's on our agenda for SPARQL Update from now until the end of March. Regarding updates, we are currently working on https://www.w3.org/TR/sparql11-http-rdf-update (see #1668) and various bug fixes and efficiency improvements |
Beta Was this translation helpful? Give feedback.
@SamuelSarle Very sorry for the late answer.
@1: QLever does support the insertion of triples or quads with arbitrary literals and IRIs, and not only those that were already contained in the original input data (which would be very limiting). It seems you have hit a bug and we will try to fix it next week (this week is super busy). Please remind us in due time in case we forget. According to a preliminary investigation: the bug should only occur for small data or when using a literal or IRI that is very rare in the original input, and even then only in special cases.
@2: Updates are not persistent yet. It's on our agenda for SPARQL Update from now until the end of March. Regarding updates…