Open VladimirAlexiev opened 5 months ago
We could use advice
but it's better to fork sparql-mode
and add this and other additions (eg sparql vs update vs tarql
derived modes, syntax checking with flycheck, etc.
A crucial question is how to pass org-babel parameters to the query tool (see params :url
and :format
in the first code block).
I'm not sure whether I understand completely. With the variant org-babel-execute:sparql
in ELOT, :url
is reused for a filename (in the sense of, if it doesn't look like a url, assume it's a filename). Maybe this should be required to be a file:///
url? It appears to me to make sense that we don't need another header parameter, but can reuse :url
.
Regarding :format
, there's a use of this in the ELOT elot-robot-execute-query
to request either csv or ttl from ROBOT. Should that be done differently?
Hi @johanwk !
:format
correctly but sparql-mode currently has only tabular SPARQL formats: https://github.com/ljos/sparql-mode/issues/77:url
is an endpoint or a file is wrong.
--data
multiple times, haven't checked whether robot can take --input
multiple times)--namedGraph
, robot in a more involved wayarq --help
shows more info but still raises some questions: https://github.com/apache/jena/issues/2411So I think you should use a new keyword eg :data
(which is a file in a triple or quad format, i.e. can populate multiple graphs).
In the future we may think of exploiting the namedGraph options of arq or robot.
Please reopen https://github.com/johanwk/elot/issues/27
I can only say I agree with all of your points here. I chose shortcuts in order to progress ELOT. sparql-mode should do much better, I just don't want to wait for it.
Will reopen :)
sparql-mode queries SPARQL endpoints that is specified with variables like this;
However, it's also interesting to query an RDF file. Eg during development of an ontology, you can extract the class hierarchy this way. Two tools that allow this: