Query a remote rdf file from studio


(Nolan Nichols) #1

Hello,

How would I go about querying a remote RDF file?

I was thinking that including a web accessible turtle file in the FROM clause would issue an HTTP GET of the file, but when I execute this is Studio, I don't get any results.

SELECT *
FROM <https://w3id.org/phuse/study#> 
WHERE {?s ?p ?o .}

Thanks!

Nolan


(zachary.whitley) #2

Stardog doesn’t support that but you can load the data with load data <url>

https://www.w3.org/TR/sparql11-update/#load


(Nolan Nichols) #3

OK thanks! It would be a handy feature to have, but this works.


(zachary.whitley) #4

I can see how it might be handy. The Stardog documentation mentions how it's not supported at https://www.stardog.com/docs/#_why_don_t_my_queries_work . I think the specs say that supporting this is up to the implementation. I personally have found it to be unnecessarily confusing as it really overloads FROM and FROM NAMED. What if there's something already in the default graph? Is it added or does it shadow? What if query all graphs is enabled? What if I use just FROM or just FROM NAMED? Maybe I just over think it but it seems to cause a lot of combinations of what could happen to justify the convenience but that's just my opinion especially since there is the LOAD DATA command.

The docs have also listed this limitation under https://www.stardog.com/docs/#_known_issues_2 which seems to imply that it might change in the future so I'm not quite sure where this stands.


(Nolan Nichols) #5

Ya I can see that there are a lot of things that 'could' happen - thanks for the pointer to the docs.

Part of why I was thinking this way is that the source will be updated frequently (data catalog) but isn't that big, so I'll need to drop the old dataset before each "LOAD INTO GRAPH "... no biggie though.