question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improving SPARQL transform

See original GitHub issue

The proposal is merge the functionality of SPARQLtransform and projections (pyql files). We would prefer for queries to always be expressed as SPARQL, in order not to loose any of the SPARQL expressiveness, but to keep the transform result representation capability – results from queries expressed as json. The transform syntax could be included using the transform keyword.

The .rq file would look like this:

#+ summary: Brief description of this query
#+ endpoint_in_url: False
#+ endpoint: "http://endpoint/sparql/"
#+ transform: {
#+     "id": "?id",
#+     "class": "$rdf:type$required$var:?class",
#+     "label": "$rdfs:label$required",
#+     "o": "?o"
#+   }

prefix dcterms: <http://purl.org/dc/terms/>

SELECT ?p ?o WHERE
{
  ?_s ?p ?o
}

@pasqLisena – I discussed this with @albertmeronyo and we agreed this might be the best way forward. Do you have any comments / suggestions?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
c-martinezcommented, Aug 1, 2019

Hi @pasqLisena. Nice! So this means I should be able to write something like this:

{
  "key": "?p$anchor",
  "value": "?o"
}

and get the desired result. Correct?

0reactions
pasqLisenacommented, Aug 1, 2019

Hi @c-martinez, I just released a version of ST in which you can replace that hard-coded id with any other property with a $anchor modifier. See documentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Steps to Fast SPARQL Queries - Stardog
A seven-step process for better SPARQL queries in Stardog. ... First, the optimizer only performs transformations which preserve the ...
Read more >
Constructing More Advanced SPARQL Queries - Medium
In this tutorial I provide many examples of CONSTRUCT queries, VALUES and alternative property paths. I explain how construct queries help ...
Read more >
Foundations of SPARQL Query Optimization
to algebraic operators, i.e. transforms the query into a SPARQL algebra expression. This algebra expression is then evaluated on the RDF input database....
Read more >
Implementing Graph Transformation Languages using RDF ...
needs to be concentrated in order to improve performance and so allow graph transformation to feasibly exploit.
Read more >
A SPARQL Query Transformation Rule Language - HAL-Inria
Abstract. This paper presents SQTRL, a language for transformation rules for. SPARQL queries, a tool associated with it, and how it can be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found