Tim; Generally speaking I would recommend D2RQ, mostly because it will perform the basic translations to RDF for you.  Then SPARQL can be used to further transform the data as required.

For saving the data as RDF, first run the D2RQ import wizard in TBC and choose what tables and columns you want to convert to RDF (the new D2RQ wizard is quite flexible).  Then open the DataView.  Use E
xport... Export/Merge/Convert to save the data into the desired format.  This system will query the db, bring the data into the Jena RDF form (yes, memory limitations apply) and save in the desired format.

Sometimes small adjustments are needed in the -Mapping file to get the transformations right, and this can be opened as RDF.  Look at the ClassMap and PropertyBridge instances.
  See the Composer help file for a link to the D2RQ mapping language, which can be helpful.

Once in an RDF mapping, further transformations are then possible through SPARQLMotion scripts, etc.

I find D2RQ can get to the relational data a views without trouble and does a good job of converting keys to object properties, etc.  But if SQL is truly needed, then IterateOverSQL can be used to iterate over a SQL result set and .  This will convert datatypes, etc., but you're on your own for figuring object relationships, etc. - which could be what is necessary if D2RQ isn't able to get do the desired mappings.

BTW, there are bits of SQL that can be used in D2RQ -  again, refer to D2RQ mapping language docs.

Let us know if that is helpful at all, Tim, and if there are further questions.

-- Scott

On 12/18/2013, 10:53 PM, Tim Smith wrote:
Hi Scott,

I have always considered D2RQ to be useful when you are leaving the data in relational form and need routine access to it via SPARQL, etc...  Rocky's use case is more one-off where there is data in relational form that will be converted to triples and materialized on a triple store.  The relational functionality will be shut-off once the transfer is complete.

That process involves everything from mapping the relational structure to an existing ontology, creating the correct CONSTRUCT queries to generate the triples, managing the creation of URIs and GRAPHS and ultimately materializing the triples in a triple store for access by other applications.

Do you recommend D2RQ for the described use case?  We typically use SPARQLMotion with a series SQL queries and ApplyConstructs to manage the ontology mapping and create the triples in cases where this is a one-off effort.

Thanks in advance for your input!

Tim



On Wed, Dec 18, 2013 at 3:34 PM, Scott Henninger <[email protected]> wrote:
Rocky;  Not really.  D2RQ is how we support relational back-ends.  There is a SQL module in SPARQLMotion, but I would not see that as being as effective as the D2RQ interface.

-- Scott

On 12/18/2013, 2:56 PM, R Wiethorn wrote:
Scott, I was just informed I'm not to use D2RQ, but to utilize sparql functions , particularly those associated with creating URIs. 
 
Can you suggest a different route?
Thanks,
Rocky

On Wednesday, December 18, 2013 2:35:58 PM UTC-5, Scott Henninger wrote:
Rocky, for access to relational data, please see Composer Help > Working with Data Back Ends > Working with Relational Databases > Importing Relational Databases with D2RQ

-- Scott

On 12/18/2013, 2:25 PM, R Wiethorn wrote:
Hello,
I'm looking for more SPARQLMotion examples to practice on.
 
Key Tasks I'm wanting to learn more about:
  1. Reading Structured Data from a Oracle DB
  2. Converting to Triples
  3. Storing the Triples for use in Sematic Layer.
 
 
The first 2 topics may be more easily obtained.  I recognize the Semantic Layer may be a very customized layer.
 
Thanks,
Rocky
 
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to