I found a solution, I created views beforehand that performed the joins,
and then used those joined views instead of the tables.
I got this idea from Frederick Giasson's blog entry about creating RDF
views for WordPress and MediaWiki:
http://fgiasson.com/blog/index.php/2007/04/24/converting-your-wordpress-
and-mediawiki-data-into-rdf-on-the-fly/
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Alex
Black
Sent: Thursday, April 26, 2007 4:47 PM
To: [email protected]
Subject: [Virtuoso-users] RDF Views: Defining quad storage,
joins?
Hi,
I'm just getting started with Virtuoso, attempting to create an
RDF view for a relational database I have in SQL Server.
I got a basic view setup, where columns map to predicates etc,
but now I want to setup a view that transforms the data into the RDF
graph I want.
I have two tables I am trying to join:
1. Concept
PK_ConceptID
2. Label
PK_LabelID,
FK_ConceptID,
Name
I'd like to get triples like:
<ConceptIRI> skos:altLabel Name
How would I do this? I've tried to do it like this, but I get an
error saying "At least one field of a quad map should be map value, not
a constant"
sparql
prefix qs: <http://adb/quad_storage/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
create quad storage qs:default
from Source.Source.vwConcept as concept
from Source.Source.vwLabel as label
where (^{label.}^.FK_ConceptID = ^{concept.}^.PK_ConceptID)
{
create qs:concepts as
graph <http://adb/source/data/concepts#>
{
conceptSchema:iri_concept(concept.PK_ConceptID)
a conceptSchema:Concept;
skos:altLabel label.Name.
} .
} .
;
Thanks!
- Alex