Not receiving any results using DESCRIBE or CONSTRUCT command on a Named graph

Hi Stardog,

I am relatively new to Stardog and am trying to work with the Virtual graph concepts.
So, tried to create a Virtual graph using MySQL as the source. The virtual graph is created successfully and by querying it, I could fetch proper data.

Further, I have exported the data into a named graph and then tried to return an RDF graph running a DESCRIBE query with a filter but unfortunately, I am not getting any results-

I have also tried running a CONSTRUCT query with a filter, still did not receive any results-

I think am missing some crucial steps here, could you kindly help me pointing it out.


Hi Ashique,

Welcome to Stardog (and SPARQL)! We've published a handful of tutorials including coverage of both SPARQL and virtual graphs. Take a look at Learn SPARQL.

The first query uses "FROM" which specifies the dataset of the query. A quick explanation of this is available at SPARQL, RDF Datasets, FROM, FROM NAMED, and GRAPH.

We don't currently support DESCRIBE over virtual graph data but when we do, you'll still need to either specify the named graph or enable the "virtual transparency" feature.

The CONSTRUCT query is missing a triple pattern in the WHERE clause. This will always produce a single empty result. In this case you'll need to copy ?id :name ?name into the WHERE and also specify the (virtual) graph name or enable virtual transparency.

Hope this helps,

Hi Jess,
Thanks for helping me out but still have couples of queries, put as below-
While using the DESCRIBE command, I am already using the named graph (as marked)

While using the CONSTRUCT query on the same NAMED GRAPH and using the FILTER command in the WHERE clause, It is throwing me error-

Any further suggestions.


1 Like

My requirement here is to return the RDF graph on the basis of the FILTER using the NAMED GRAPH which has already been created using the IMPORT command-

stardog-admin virtual import -g '' us_db inp_file/ inp_file/us_mappings.sms

1 Like

I think you need to check the SPARQL tutorials.
Assuming the RDF data has been loaded into the named graph

DESCRIBE should return IRIs (entities) which would be described. ?name must be a literal for the FILTER to match and shouldn't be included here. What result are you seeing for this?

CONSTRUCT is returning an error that shorthand form is not permitted when a FILTER is present. You must describe the output triples as patterns in the template of the CONSTRUCT. Please read up on how to form a CONSTRUCT query.


Sorry if I wasn't clear about DESCRIBE. The WHERE clause in describe should return IRIs/entities and the DESCRIBE query itself will return triples describing these entities.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.