great thnx Hugh.

Still some problems using DB.DBA.RDF_LOAD_RDFXML

seems to work fine in ISQL but i get a syntax error in python odbc connection:

In [61]: connect.execute('''DB.DBA.RDF_LOAD_RDFXML (file_to_string
('/test-virtuoso/cmn2.rdf'), '', 'http://mygraph.com') ; ''')

---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)

/Users/kurtjx/Documents/workspace/myspace-serv/src/<ipython console>
in <module>()

Error: ('37000', '[37000] [OpenLink][Virtuoso iODBC Driver][Virtuoso
Server]SQ074: Line 1: syntax error (-1) (SQLExecDirectW)')



On Mon, Jun 15, 2009 at 1:23 PM, Hugh Williams<hwilli...@openlinksw.com> wrote:
> Hi Kurt,
> I shall have to check with development if the "file://" prefix is supported
> as I get a similar problem using isql :
> SQL> sparql load "file://vc-db-1.rdf" into <http://mygraph.com>;
> *** Error 39000: [Virtuoso Driver][Virtuoso Server]FA005: Can't open file
> '/usr/local/virtuoso-opensource/var/lib/virtuoso/vsp/D5=1bd406a9e59cb59be0cb0262a45d56f6&graphMD5=3e67775edad527462fe95c1f287d9dab',
> error 2
> at line 1 of Top-Level:
> sparql load "file://vc-db-1.rdf" into <http://mygraph.com>
> In the meantime can you not use one of the other load methods like
> RDF_XML_LOAD, which does work for me:
> SQL> DB.DBA.RDF_LOAD_RDFXML (file_to_string
> ('/usr/local/virtuoso-opensource/var/lib/virtuoso/db/vc-db-1.rdf'), '',
> 'http://mygraph.com');
> Done. -- 3 msec.
> SQL> sparql select distinct ?s ?p ?o  from <http://mygraph.com>  where {?s
> ?p ?o};
> s
>       p
>             o
> VARCHAR
>       VARCHAR
>             VARCHAR
> _______________________________________________________________________________
> http://somewhere/JohnSmith/
>       http://www.w3.org/2001/vcard-rdf/3.0#FN
>             John Smith
> http://somewhere/JohnSmith/
>       http://www.w3.org/2001/vcard-rdf/3.0#N
>            nodeID://1000010004
> http://somewhere/RebeccaSmith/
>      http://www.w3.org/2001/vcard-rdf/3.0#FN
>           Becky Smith
> http://somewhere/RebeccaSmith/
>      http://www.w3.org/2001/vcard-rdf/3.0#N
>            nodeID://1000010005
> http://somewhere/SarahJones/
>      http://www.w3.org/2001/vcard-rdf/3.0#FN
>           Sarah Jones
> http://somewhere/SarahJones/
>      http://www.w3.org/2001/vcard-rdf/3.0#N
>            nodeID://1000010006
> http://somewhere/MattJones/
>       http://www.w3.org/2001/vcard-rdf/3.0#FN
>             Matt Jones
> http://somewhere/MattJones/
>       http://www.w3.org/2001/vcard-rdf/3.0#N
>            nodeID://1000010007
> nodeID://1000010004
>       http://www.w3.org/2001/vcard-rdf/3.0#Family
>             Smith
> nodeID://1000010004
>       http://www.w3.org/2001/vcard-rdf/3.0#Given
>            John
> nodeID://1000010005
>       http://www.w3.org/2001/vcard-rdf/3.0#Family
>             Smith
> nodeID://1000010005
>       http://www.w3.org/2001/vcard-rdf/3.0#Given
>            Rebecca
> nodeID://1000010006
>       http://www.w3.org/2001/vcard-rdf/3.0#Family
>             Jones
> nodeID://1000010006
>       http://www.w3.org/2001/vcard-rdf/3.0#Given
>            Sarah
> nodeID://1000010007
>       http://www.w3.org/2001/vcard-rdf/3.0#Family
>             Jones
> nodeID://1000010007
>       http://www.w3.org/2001/vcard-rdf/3.0#Given
>            Matthew
> 16 Rows. -- 35 msec.
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software
> Web: http://www.openlinksw.com
> Support: http://support.openlinksw.com
> Forums: http://boards.openlinksw.com/support
>
>
> On 15 Jun 2009, at 11:04, Kurt J wrote:
>
> in case there is another option in my virtuoso.ini file that might be
> wrong, it is here:
> http://pastebin.com/m7494e063
> cheers,
> kurt j
> On Mon, Jun 15, 2009 at 10:58 AM, Kurt J<kur...@gmail.com> wrote:
>
> Hi Hugh,
> thanks but this still does not seem to work.  from the virtuoso.ini file:
> DirsAllowed                     = .,
> /usr/local/virtuoso-opensource/share/virtuoso/vad,
> /test-virtuoso
> i've but the file in '.' and '/test-virtuoso' and '/usr/local/...
> /vad' to no avail.
> i get the same error message:
> In [42]: connect.execute('''sparql load
> <file://usr/local/virtuoso-opensource/share/virtuoso/vad/cmn.rdf> into
> <http://test.cmn.graph>''')
> ---------------------------------------------------------------------------
> Error                                     Traceback (most recent call last)
> /Users/kurtjx/Documents/workspace/myspace-serv/src/<ipython console>
> in <module>()
> Error: ('39000', "[39000] [OpenLink][Virtuoso iODBC Driver][Virtuoso
> Server]FA005: Can't open file
> '/test-virtuoso/vsp/D5=17eaf0b98fe28b8448405cdb159b7b58&graphMD5=ec2d5ae1a16231d222dfb7ecbdfd60cf',
> error 2 (-1) (SQLExecDirectW)")
> thanks for your help.
> -kurt
>
> On Sat, Jun 13, 2009 at 12:49 AM, Hugh Williams<hwilli...@openlinksw.com>
> wrote:
>
> Hi Kurt,
> You indicate the file is in your ./vsp folder, but is the Virtuoso Server
> Allowed Access to this location as indicated in the the "DirsAllows"
> parameter of the configuration file (virtuoso.ini) ? By default the config
> file contains:
> DirsAllowed = ., /usr/local/virtuoso-opensource/share/virtuoso/vad,
> /usr/local/virtuoso-opensource/var/lib/virtuoso/db
> So I would suggest placing the file in the "db" folder assuming this is in
> your DirsAllowed param ...
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software
> Web: http://www.openlinksw.com
> Support: http://support.openlinksw.com
> Forums: http://boards.openlinksw.com/support
>
> On 12 Jun 2009, at 18:20, Kurt J wrote:
> Hi All,
> I want to insert a local rdf into the store thru an odbc connection.
> Is this doable?
> If i put the file in the ./vsp dir, i get this:
> In [29]: con =
> pyodbc.connect('DSN=SysVirt;UID=dba;PWD=dba;HOST=localhost:1112')
> In [30]: con.execute('''sparql load <file://cmn2.rdf> into
> <http://test.cmn.graph>''')
> ---------------------------------------------------------------------------
> Error                                     Traceback (most recent call last)
> /Users/kurtjx/Documents/workspace/myspace-serv/src/<ipython console>
> in <module>()
> Error: ('39000', "[39000] [OpenLink][Virtuoso iODBC Driver][Virtuoso
> Server]FA005: Can't open file
> '/test-virtuoso/vsp/D5=17eaf0b98fe28b8448405cdb159b7b58&graphMD5=fa0c30ab328817713407d402b927a311',
> error 2 (-1) (SQLExecDirectW)")
> also note that i first tried:
> con.execute('''sparql load <cmn2.rdf> into <http://test.cmn.graph>''')
> (no 'file://') and this crashed virtuoso 5.11 w/ a segfault.  just fyi.
> thanks,
> Kurt J
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>

Reply via email to