Sebastian Hellmann wrote:
Yes, thank you,
if this was a forum you could make the mail sticky :)
I will forward it to everybody, who asked me the export question in the
past.
Sebastian
It should be in a technote, and also used as an example in our docs etc..
Will be sorted.
Kingsley
Yrjänä Rankka schrieb:
On 9/17/09 00:31 , Georgi Kobilarov wrote:
*push*
I'd be also very interested in seeing a solution to the question Sebastian
brought up...
Ok. If you want to dump huge graphs you probably don't want to work
through the regular SPARQL endpoint. There's a little-known PL procedure
that'll do the trick:
create procedure DB.DBA.RDF_GRAPH_TO_TTL (in graph_iri varchar, inout
ses any)
Second argument is a string_output, which is a stream - to make a long
story short, here's a simple stored proc I just cooked up that would
dump a graph to local file system:
create procedure
graph_to_ttl_file (in graph_iri varchar, in f_name varchar)
{
declare ses any;
ses := string_output();
DB.DBA.RDF_GRAPH_TO_TTL (graph_iri, ses);
string_to_file (f_name, ses, 0);
}
Just make sure the f_name has a path component that points somewhere
your Virtuoso is allowed to go in virtuoso.ini - my very dangerous
setting for the test case was:
[Parameters]
DirsAllowed = .,../vad
and then run with something like this:
SQL> graph_to_ttl_file ('http://danbri.org/foaf.rdf', 'danbri-dump.ttl');
Done. -- 10 msec.
SQL>
Voilà!
The RDF_GRAPH_TO_TTL is a bit less efficient that it could be as it uses
old PL functions for things we now have BIFs written in C - it will be
rewritten shortly. It should be useable as is, though.
Let me know how it works for you!
Best Regards,
Yrjänä
Cheers,
Georgi
-----Original Message-----
From: Sebastian Hellmann [mailto:kur...@googlemail.com]
Sent: Wednesday, September 16, 2009 5:15 PM
To: virtuoso-users@lists.sourceforge.net; Michael Martin
Subject: [Virtuoso-users] Virtuoso export
Hello,
what is the best way to export data from Virtuoso.
I want to export a graph,
should I really use SPARQL construct with LIMIT, OFFSET and ORDER BY ?
I just wanted to check in case there is a better function.
Regards,
Sebastian Hellmann, AKSW
-----------------------------------------------------------------------
-------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart
your
developing skills, take BlackBerry mobile applications to market and
stay
ahead of the curve. Join us from November 9-12, 2009. Register
now!
http://p.sf.net/sfu/devconf
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
--
Regards,
Kingsley Idehen Weblog: http://www.openlinksw.com/blog/~kidehen
President & CEO
OpenLink Software Web: http://www.openlinksw.com