This project has moved and is read-only. For the latest updates, please go here.

Left join sparql query

Oct 6, 2014 at 4:59 PM
Edited Oct 6, 2014 at 5:00 PM
Hi there,

I am trying to run a 'left join' sparql query on BSD, but the query just hangs.

basically I have the following two queries:
select ?p ?o 
{<> ?p ?o }

select ?p ?o ?resourceName
 where {<> ?p ?o .
?o <> ?resourceName
I would like to combine them to get the following three columns:
?p ?o ?resourceName (could be empty)

I have tried the following query:
select ?p ?o ?resourceName 
{<> ?p ?o .
OPTIONAL {?o <> ?resourceName.}
which looks correct according to the documentation, but when I run it through the web app it just hangs.

I am not sure whether the query is correct, and BSD hangs, or whether the query is incorrect.

Any ideas?

Oct 7, 2014 at 2:55 PM

I can confirm that I have reproduced the bug with some very simple test data so I'll set about making a unit test and see if I can get a fix for this.


Oct 7, 2014 at 3:13 PM
Thank you :-)
Oct 7, 2014 at 5:58 PM
It turned out to be a problem with the HTML rendering for the SPARQL result - the query was running fine it was just that the template wasn't handling a NULL value in the SPARQL results set and Nancy then got stuck while trying to render its error page. I've pushed a fix for this to the github repo.
Marked as answer by techquila on 10/9/2014 at 12:17 PM
Oct 9, 2014 at 10:49 AM
Perfect, thanks, that worked! :-)
Oct 9, 2014 at 8:17 PM