[redland-dev] Some issues running redland-virtuoso-test
lorena
lorenae at fing.edu.uy
Wed Jan 25 07:23:50 EST 2012
Hi
After installing Redland I wanted to check it's integration with Open
Source Virtuoso.
I've configured the ODBC connection and run utils/redland-virtuoso-test but
the last 3 tests failed.
After inspecting the source code I found that the problem was in the query
declaration
query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char
*)query_cmd, NULL);
By replacing these lines by the following I was able to successfully run
tests 19, 20, 21
query=librdf_new_query(world, "vsparql", NULL, (const unsigned char
*)query_cmd, NULL);
In particular I want to perform SPARQL GROUP BY queries over Virtuoso, so I
decided to modify the tests in order to run this query:
SELECT ?s (sum(?o) AS ?sumO)
WHERE {graph <http://red> { ?s ?p ?o }}
GROUP BY ?s
Consider a graph <http://red> that only contains the following triples
(otherwise the sum operator can not be applied since ?o may bind to some
non numeric values):
rc |= add_triple_typed(world, context_node, model, "oo", "pp", "10^^<
http://www.w3.org/2001/XMLSchema#int>");
rc |= add_triple_typed(world, context_node, model, "oo", "pp", "12^^<
http://www.w3.org/2001/XMLSchema#int>");
rc |= add_triple_typed(world, context_node, model, "oo", "pp", "15^^<
http://www.w3.org/2001/XMLSchema#int>");
Surprisingly the query still raises an error, since VIrtuoso can not parse
this object values as integers.
My workaround was to re define the add_triple_typed function, and now I
actually pass type URLs as parameters, using *
librdf_new_node_from_typed_literal* instead of *
librdf_new_node_from_uri_string* to create the nodes.
I just wanted to know if this is ok or am I missing something?
Regards
Lorena
--
Lorena Etcheverry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librdf.org/pipermail/redland-dev/attachments/20120125/bc2f3a4b/attachment.html>
More information about the redland-dev
mailing list