Hi all,

I want to export triples from virtuoso line by line (efficient streaming
into another process)
in NT format.
I came with the following code ($1), where is a sparql query filled in by
bash


CREATE PROCEDURE dump_query_tmp(  )
  {
    DECLARE  col  BLOB;
    DECLARE  env, ses      any;
    RESULT_NAMES(col);
    SET ISOLATION = 'uncommitted';
    ses := string_output ();
    env := vector (0, 0, 0);
    FOR (SELECT * FROM ( SPARQL DEFINE input:storage ""
                   SELECT ?s ?p ?o { $1}
                   ) AS sub OPTION (LOOP)) DO
    {
    http_rewrite(ses);
    http_nt_triple (env, "s", "p", "o", ses);
    result(string_output_string (ses));
   }
  end_result();
};


All goes well, except when a line is longer than 2000 characters.

Warning 01004: [Virtuoso Driver]CL077: Data truncated in column 1 of the
result-se(col, type 254)
at line 33 of Command-Line-Load /tmp/the_query.sparql:
dump_query_tmp()


I changed the type of he object given to result_names to just about
anything I could think off, but no avail. I can work around it of course
(split it out etc) but I am doing something wrong of is this some
limitation?
If someone has an entirely different way to accomplish exactly the same: by
my guest to show me!

Thanks in advance!


Kenny
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to