-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would it be theoretically possible to bundle a small SPARQL engine with the plugin? #37
Comments
We talked about this internally already, main problem is that VS Code is not a normal JavaScript environment. It's neither Node.js nor it is a browser. Which means getting things like that to work usually fails on some weird errors that can or cannot be solved easily. If someone spends time on testing whatever we would need in VS Code we might work on it but without contributions or funding I don't think this will happen anytime soon. |
Thank you for your answer @ktk, I thought this was the case! Probably a better solution would be to have a web service that can expose an adhoc sparql endpoint based on a file provided, and query that, rather than overloading your plugin. |
@matentzn you might want to try this one as well https://github.com/elsevierlabs-os/linked-data Didn't try it but it should be able to do SPARQL directly. |
Thank you @ktk! |
@matentzn are you still interested to have this feature ? I think i can implement it. Why do you need this feature? Just to know what is the scope of this feature. |
We are developing ontologies, so it's sometimes useful to quickly query a local file turtle or rdfxml file. |
I very often need to query local files. I've been doing this for years only with Topbraid composer. |
Thank you @kvistgaard. I am always happy to get feedback about features like this. The technical implementation is not very hard. It's more the "how to integrate it". But I am on it. |
I would like to add my support to this feature. I've been using sparql notebooks since a while now and think querying a local file can help with education, data testing, development of ontologies, ... Many thanks! |
@VBP8501 @kvistgaard @matentzn @ktk The feature is there. It's still a bit hidden, but you can use it. You can find the option in the context menu in the file explorer. The implementation uses Oxigraph, and I've tested it with 103,111 triples. |
I just tested the functionality and it seems to work perfectly! Good job and thanks! :) |
Super, super cool! For my personal use cases, this gets me 85% of the way; to round it up to 100, would it be at all in the realms of possible to embed:
So that I can have one sparqlbook which I link to X different sparql dumps which I can run all at once? |
@matentzn Thanks for sharing your feedback. I see your point. Now a bit unrelated to your need. I have a few questions. Having a local sparql endpoint is not just "run a query on a file". It provides more possibilities e.g. We can fill the local store with ...
and you can combine all together. or we can fill the local store with a CONSTRUCT run SHACL validation on it before we run our SELECT queries. Any opinion about things like this? |
I think this is all great, but I must admit that I am working in the context of the Ontology Development Kit which means I use |
now i see your workflow. Thank you @matentzn |
@BenjaminHofstetter , speaking of construct, I often need to save the resulting file. For example, currently, I have a CONSTRUCT query that works on a Wikibase instance, Wikibase doesn't provide the possibility to save as Turtle. There are ways to overcome that, but it would be way more convenient to view and save the result as Turtle, TriG, N-Quads, or JSON-LD. |
@matentzn in version 0.0.31 I added a Cell Status Bar showing the SPARQL Target and where it's coming from and the cell source (cell or a query file). You can hover over it to see the url or file path. In this version you can do this # [endpoint=./rdf/curia.nt] the path can be absolute or relative. But I suggest to use relative path. to be portable. The File Endpoint is loading the triples during cell execution. This makes it a bit slow because it loads the file every time and this takes more time than executing the query :-) |
I just found out that a plain RDF file doesn't seem to work as source. I've converted the file into turtle serialization and that worked fine. And next I found that when the file is refreshed and you relaunch a query, you'll get the same result. You need to redo the click-right-on-file and use-file-as-store I'm on version v0.0.31 Again... this local-file-as-source feature save so much time during my knowledge graph construction! |
@BenjaminHofstetter is there are a way to query several ttl files at once? |
What I do now is use ttl-merge to merge several ttl files into one. It would be very cool if sparql-notebooks could use a similar method as sparql-anything to refer to local files or remote repo's, by using the SERVICE clause. fyi, here is an example on how sparql-anything would query a local file: SELECT *
WHERE {
SERVICE <x-sparql-anything:location=/data/BelgiumRailwayStations.csv,csv.headers=true> {
?s ?p ?o
}
} Now that I'm making a relation between sparql-notebook and sparql-anything... having a sparql-anything-notebook would be very very nice :) |
I personally use n-triple files. they can be easily concatenated. But I was thinking about providing the ability to combine multiple file. I am thinking about it how to implement it. SPARQL anything notebook sounds interesting. |
It would be pretty awesome if it was somehow possible to do something like
https://sparql.gtf.fyi
(SORRY submitted issue to fast)
It is most likely out of scope for the plugin, but is it maybe somehow possible to easily query a local ttl file without the need of having a SPARQL endpoint running? Happy for this issue to be immediately closed as out of scope, just checking.
The text was updated successfully, but these errors were encountered: