Hello,

I am implementing a PL/SQL procedure to materialize triples using CONSTRUCT.
To this goal, I loaded a dictionary "directly" from a CONSTRUCT query
using (( )) operator as you can see in the example 1 (see below) and
it worked. However, when I load the dictionary from a variable which
in turns holds the CONSTRUCT query, it does not work (see example 2
and the error message below).

I guess the operator (()) cannot work directly over a variable but I
have not found documentation about how to "cast" it correctly.

Any idea?

I am following this example http://docs.openlinksw.com/virtuoso/rdfsparul/
For your knowledge, all the variables were properly defined.

Regards,

Adam


###################EXAMPLE 1#############################

pdata_dict := (( sparql construct { ?this
<http://example.org/ontology#status> ?alive }
      where { graph <http://family> {select ?this "alive" AS ?alive {
              ?this <http://example.org/ontology#yearBirth> ?yearBirth.
               FILTER NOT EXISTS {?this
<http://example.org/ontology#yearDeath> ?yearDeath}
            }}} )) ;

pdata_array := dict_list_keys (pdata_dict, 1);
RDF_INSERT_TRIPLES (family_graph, pdata_array);

###################EXAMPLE 2#############################

query := 'sparql construct { ?this <http://example.org/ontology#status> ?alive }
      where { graph <http://family> {select ?this "alive" AS ?alive {
              ?this <http://example.org/ontology#yearBirth> ?yearBirth.
               FILTER NOT EXISTS {?this
<http://example.org/ontology#yearDeath> ?yearDeath}
            }}}';

pdata_dict := (( query )) ;

pdata_array := dict_list_keys (pdata_dict, 1);
RDF_INSERT_TRIPLES (family_graph, pdata_array);


#######################Error message######################

SQLState: 22023

Message: SR564: Function dict_list_keys needs a NULL or a dictionary
reference as argument 1, not an arg of type VARCHAR (182)

########################################################

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to