This content has been marked as final. Show 3 replies
It depends on the complexity and size of your triples.
You can try using spool in sqlplus, try set linesize to 200, but if you have triples longer than that you need to set linesize to the largest triple size you have
Here is a simple example, but I will leave open to others to comment as this does not do any validation of data
set echo off
set pagesize 0
set feed off
set linesize 200
SELECT '<'|| s ||'> <'|| p ||'> <'|| o ||'> .' <<-- The html is meesing up the syntax, I can send you an email (email@example.com)
'(?s ?p ?o)',
Edit the spooled file family.nt and get rid of the query and the spool off lines, so there is only triples
Edited by: jbarba on Mar 7, 2012 9:42 AM
Length of triples should not be a problem.
What I would like such export utility to do is to create a syntactically correct RDF/XML file [with all namespaces, references, etc] out of my data. This file will later be used as input by our partners, possibly using other RDF-enabled software.
I know Oracle has very elaborated machinery to handle XML data, that is why I hope to see such an utility within SEM_APIS.
THanks for your answer
Unfortunately we do not have the code within SEM_APIS to do the task. This is something we already discussed with Development at some point in a case for another customer.
What we have for now that you may already are aware of is the use of the jena framework to generate N-Triple or RDF/XML output
There are a couple of notes:
How To Use Jena Adapter To Extract A Model To Move From One Database To Another Database (Doc ID 1124288.1)
How To Move Semantic Models From One Database To Another (Doc ID 1347754.1)
Same code in those notes can be used to generate RDF/XML changing the line
The formats you can output are: "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value is represented by null is "RDF/XML".
I know this implies the extra work of installing java JDK and Jena framework but that is the only way for now.