I'm new to stardog and trying to explore the capabilities of Stardog by creating some proof of concepts, with trial version of Stardog installed in the VM.
Is there a way to connect multiple database to a same virtual graph ?
If not, is there a way we would be able to connect multiple virtual graphs of different data sources ( like virtual graph A connected to MySQL with virtual graph B connected to a MongoDB ) ?
Thanks for your question. A virtual graph in Stardog is defined against a single data source. You can learn about virtual graphs from some of the following resources:
Creating virtual graphs over multiple data sources is the basis for connecting data from otherwise independent data sources. You can create a virtual graph A connected to MySQL and virtual graph B connected to MongoDB and reference these virtual graphs in your query via GRAPH keyword or SPARQL's dataset (FROM and FROM NAMED).
I hope this helps. Let us know how it goes or if you have any further questions.
Is it possible to combine two virtual graphs of different data sources by referncing with a sparql query as you told?
I'm unable to combine two virtual graphs of different data sources ( 1 virtual graph of mongodb and other virtual graph of mysql ). please advise if i'm missing anything..
in below image - moviedateset virtual graph is source from mongodb, testmusic virtl graph has a source of mysql db
If i query both virtual graphs separately I'm getting the results.
but empty results are returned only while combining 2 virtual graph of 2 different data sources in a SPARQL query.
Thanks for following up. I must have missed your previous reply. There can be only one explanation here (famous last words...). A virtual graph may be configured to be logically contained within a database. This is configured with the "Stardog Database" field in the virtual graph configuration. Here's an example:
If you set this field to "All Databases", the virtual graph can be queried from any database. If you choose a single database, the virtual graph is considered to be contained in the database and can only be queried from that database. It seems you must have set this field to the "testmusic" database and therefore the virtual graphs cannot be queried from the "moviedatabase" database.