OpenRefine / SparqlExtension

Extension which lets you create an OpenRefine project from a SPARQL query
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Trying to query ArtsData SPARQL end-point fails #27

Closed antoine2711 closed 1 year ago

antoine2711 commented 1 year ago

Description of the problem

End-point: http://kg.artsdata.ca/sparql/

# Upcoming events in Artsdata.ca

PREFIX schema: <http://schema.org/>
SELECT DISTINCT  ?start ?status ?mode (sample(?label) as ?name)  (sample(?url) as ?webpage)
WHERE {
  ?e a schema:Event ;
     schema:startDate ?start ;
     schema:name ?label ;
     schema:url ?url ;
     schema:eventStatus ?status ;
     schema:eventAttendanceMode ?mode .
  FILTER(?start > '2022-08-10T01:47:07.569Z'^^xsd:dateTime)
} 
GROUP BY ?start ?status ?mode
LIMIT 1000

This will trigger an error: « Unable to parse preview ».

WaltonG commented 1 year ago

From the console log it seems the query didn't return a valid json string.

Exception::{}com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')

Am looking into it

WaltonG commented 1 year ago

@antoine2711 The correct enpoint has to be provided which is http://kg.artsdata.ca/querynot http://kg.artsdata.ca/sparql/

http://kg.artsdata.ca/sparql/ is used by the provided YASGUI user interface while remote sparql clients use http://kg.artsdata.ca/query

antoine2711 commented 1 year ago

@antoine2711 The correct enpoint has to be provided which is http://kg.artsdata.ca/querynot http://kg.artsdata.ca/sparql/

http://kg.artsdata.ca/sparql/ is used by the provided YASGUI user interface while remote sparql clients use http://kg.artsdata.ca/query

Oups. Good catch. Thanks. Antoine

antoine2711 commented 1 year ago

But still @WaltonG, we could improve the error message.

A.

WaltonG commented 1 year ago

@antoine2711 Since an error can be caused by any type exception I think a generalised error message Unable to parse preview is ideal rather than displaying the backend error message. Any suggestions ?