Ok.  finally using DB.DBA.RDF_LOAD_RDFXML_MT instead of
DB.DBA.RDF_LOAD_RDFXML works as expected.

not sure i grok the difference between the two.  but for me (python
2.5, pyodbc, os x, vos 5.11) only DB.DBA.RDF_LOAD_RDFXML _MT seemed to
work properly from the python odbc connection

hope this may be of some help to others...

cheers,
kurt j

On Mon, Jun 15, 2009 at 5:20 PM, Kurt J<kur...@gmail.com> wrote:
>> In [61]: connect.execute('''DB.DBA.RDF_LOAD_RDFXML (file_to_string
>> ('/test-virtuoso/cmn2.rdf'), '', 'http://mygraph.com') ; ''')
>
> finally, it seems the problem here is the ';' omitting this it takes the 
> command
>
> but there's another problem now:
>
> In [4]: connect.execute('''DB.DBA.RDF_LOAD_RDFXML
> (file_to_string('/test-virtuoso/cmn2.rdf'), '',
> 'http://mygraphfunky.com')''')
> Out[4]: <pyodbc.Cursor object at 0xf9ab80>
>
> In [5]: connect.execute('''sparql select * from
> <http://mygraphfunky.com> where {?s ?p ?o }''')
> Out[5]: <pyodbc.Cursor object at 0xf9ac28>
>
> In [6]: for r in Out[5]: print r
>   ...:
> ('#BOLC', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
> 'http://purl.org/ontology/mo/Composer')
> ....
>
> (loads of results, what we'd expect to see)
>
> ...
> ('#BIBE', 'http://xmlns.com/foaf/0.1/birthday', '1644-1704')
> ('#BIBE', 'http://grasstunes.com/ontology/musicnet.owl#cmnHasInfluenced',
> '#COWE')
> ('#BIBE', 'http://grasstunes.com/ontology/musicnet.owl#cmnHasInfluenced',
> '#SCHU3')
>
> In [7]: connect.close()
>
> In [8]: connect =
> pyodbc.connect('DSN=SysVirt;UID=dba;PWD=dba;HOST=localhost:1112')
>
> In [9]: connect.execute('''sparql select * from
> <http://mygraphfunky.com> where {?s ?p ?o }''')
> Out[9]: <pyodbc.Cursor object at 0xf9aaa0>
>
> In [10]: for r in Out[9]: print r
>   ....:
>
> after closing the odbc connection the graph is empty!  any idea what gives?
>
> -kurt j
>

Reply via email to