Re: sparql problem

2020-12-18 Thread Andy Seaborne
General comment: it is a good idea to validate the data before trying to 
load the data. If there is an error in the data a long way into the 
file, the bulk loader has already been domign some wokr so i


So if the data can have errors, it is useful to do a check by reading it 
with "riot" first before attempting to load it.






[ and ] are not allowed in the path part of an IRI either.

Andy

On 18/12/2020 07:29, Lorenz Buehmann wrote:

As the error message indicates, white spaces are not allowed in IRIs -
you have to percent encode white spaces

On 18.12.20 04:55, Murphy wrote:

11:39:07 ERROR riot:: [line: 2415, col: 40] Bad character in IRI (space): 

org.apache.jena.riot.RiotException: [line: 2415, col: 40] Bad character in IRI 
(space): 


Re: sparql problem

2020-12-17 Thread Lorenz Buehmann
As the error message indicates, white spaces are not allowed in IRIs -
you have to percent encode white spaces

On 18.12.20 04:55, Murphy wrote:
> 11:39:07 ERROR riot:: [line: 2415, col: 40] Bad character in IRI 
> (space): 
> org.apache.jena.riot.RiotException: [line: 2415, col: 40] Bad character in 
> IRI (space): 


Re: sparql problem

2020-12-15 Thread Andy Seaborne

Hi there,

> apache-jena-fuseki-3.5.0

That's quite old - the current version is 3.17.0
Upgrading would be a good idea just in case.

Are there any messages in the server log file?


It is going to be difficult to pin down an encoding issue (if that is 
what it is) because by the time we get this email, it has been 
encoded/decoded so many times it may have changed the data.


What displays correctly one way may actually be different bytes, but it 
is hidden by display reversing the mis-encoding.  This is especailly 
true for data displayed in web-browsers.


It is worth executing the queries from the command line with Fuseki running.

Looking at the UTF-8, the first and third queries look right.

Andy

Comments inline below:


On 15/12/2020 03:12, 周蓉 wrote:

Hello, when I query in Fuseki like this:

PREFIX : 

SELECT * WHERE {

   ?s ?p ?o.

} #query1

It can return the many results ,one of the results is:
:口腔毛滴虫病rdf:type:症状


when I query like this:
PREFIX : 
SELECT * WHERE {
   :口腔毛滴虫病 rdf:type ?o.
} #query2
it can return the results:
:症状


(That does not show a prefix for rdf: presumably the real query has that 
PREFIX in it?)


Could you try the query with



This eliminates one step - the prefix to URI conversion.




but when I query like this:
PREFIX : 
SELECT * WHERE {
   ?s rdf:type :症状.
} #query3
it returns:
No data available in table





it confused me again

is this the problem related to the OWL data in 
..\jena\apache-jena-fuseki-3.5.0\run\databases?

or RDF data in ..\jena\tdb


I would certainly check the data by dumping the database.
That is especially the the encoding of the URI 







look forward and thanks for your reply





  



Re: SPARQL problem

2013-10-02 Thread Michael Brunnbauer

Hello Andy,

On Mon, Sep 30, 2013 at 12:33:57PM +0100, Andy Seaborne wrote:
 http://www.brunni.de/sparql_turing_machine.txt
 http://www.brunni.de/searchsparqlendpoints.txt

Those queries do not work any more after updating from Fuseki 0.2.5 to 1.0.0.
It seems to be related to the WITH keyword because this minimal example works
with the default graph but not with WITH:

drop graph http://mytest;
insert data { graph http://mytest { _:b0 http://test test }};
WITH http://mytest

DELETE {
?s ?p test
}
INSERT
{
?s ?p test1.
}
WHERE
{
?s ?p test
}

The triple _:b0 http://test test1 will not show up - but it works on
the default graph:

drop DEFAULT;
insert data { _:b0 http://test test };
DELETE {
?s ?p test
}
INSERT
{
?s ?p test1.
}
WHERE
{
?s ?p test
}

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail bru...@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel


pgp6Ve7Cqlpky.pgp
Description: PGP signature


Re: SPARQL problem

2013-10-02 Thread Andy Seaborne

Could you raise a JIRA please so this does not get lost?

Thanks

Andy

On 02/10/13 13:33, Michael Brunnbauer wrote:


Hello Andy,

On Mon, Sep 30, 2013 at 12:33:57PM +0100, Andy Seaborne wrote:

http://www.brunni.de/sparql_turing_machine.txt
http://www.brunni.de/searchsparqlendpoints.txt


Those queries do not work any more after updating from Fuseki 0.2.5 to 1.0.0.
It seems to be related to the WITH keyword because this minimal example works
with the default graph but not with WITH:

drop graph http://mytest;
insert data { graph http://mytest { _:b0 http://test test }};
WITH http://mytest

DELETE {
?s ?p test
}
INSERT
{
?s ?p test1.
}
WHERE
{
?s ?p test
}

The triple _:b0 http://test test1 will not show up - but it works on
the default graph:

drop DEFAULT;
insert data { _:b0 http://test test };
DELETE {
?s ?p test
}
INSERT
{
?s ?p test1.
}
WHERE
{
?s ?p test
}

Regards,

Michael Brunnbauer





Re: SPARQL problem

2013-10-02 Thread Michael Brunnbauer

Hello Andy,

On Wed, Oct 02, 2013 at 05:18:24PM +0100, Andy Seaborne wrote:
 Could you raise a JIRA please so this does not get lost?

https://issues.apache.org/jira/browse/JENA-553

I guess it is OK if I go to JIRA directly in the future without posting to
the list ?

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail bru...@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel


pgpNlHWmC8Xnl.pgp
Description: PGP signature


Re: SPARQL problem

2013-10-02 Thread Andy Seaborne

On 02/10/13 17:44, Michael Brunnbauer wrote:


Hello Andy,

On Wed, Oct 02, 2013 at 05:18:24PM +0100, Andy Seaborne wrote:

Could you raise a JIRA please so this does not get lost?


https://issues.apache.org/jira/browse/JENA-553

I guess it is OK if I go to JIRA directly in the future without posting to
the list ?


Yes, if there is a complete, minimal example.

Your report is good and I have already managed to see something wrong.

General observation:

The project is getting busier with lists regularly at the upper end of 
volume.  August was the busiest month on both lists since being at 
Apache.  So - efficiency - reports need to be understandable and 
complete and ideally with patches.


Contribute patches!

Andy



Regards,

Michael Brunnbauer





Re: SPARQL problem

2013-09-30 Thread Andy Seaborne

On 29/09/13 19:13, Michael Brunnbauer wrote:


Hello Andy,

On Sat, Sep 28, 2013 at 09:02:04PM +0100, Andy Seaborne wrote:

  ?ep a void:sparqlEndpoint
  SERVICE SILENT ?ep { ...

then ?ep is not bound if the federation fails. That a failure causes a
match
with unbound variables is expected but that ?ep is also unbound in this
case
surprised me. This is intended ?


Is it? In the latest version?  Assuming ?ep a void:sparqlEndpoint
matches something in the local dataset

SERVICE SILENT ?ep -- failure

evaluates to the join identity (one row, no columns) and ?ep is unbound
in that.  This joins with the eval of ?ep a void:sparqlEndpoint.

If not, please submit a JIRA with complete minimal example.


Thank you very much for your help so far!

I really should get into SPARQL algebra. Meanwhile I guess that ?ep should
stay bound if ?ep is bound in the first part of the query and is joined with
the join identity.

I upgraded to Fuseki 1.0.0 without success regarding this. So here is my JIRA:

https://issues.apache.org/jira/browse/JENA-552


Thanks - and (hopefully!) fixed.


Completely different topic: Has a REPEAT WHILE keyword/feature ever been
discussed for SPARQL UPDATE in the working group ? See:

http://www.brunni.de/sparql_turing_machine.txt
http://www.brunni.de/searchsparqlendpoints.txt


No. This gets into the whole area of a SPARQL syntax for something 
rules-ish - obviously a good thing to have but beyond the remit of the 
SPARQL-WG that has just finished.


Andy



Regards,

Michael Brunnbauer





Re: SPARQL problem

2013-09-29 Thread Michael Brunnbauer

Hello Andy,

On Sat, Sep 28, 2013 at 09:02:04PM +0100, Andy Seaborne wrote:
   ?ep a void:sparqlEndpoint
   SERVICE SILENT ?ep { ...
 
 then ?ep is not bound if the federation fails. That a failure causes a 
 match
 with unbound variables is expected but that ?ep is also unbound in this 
 case
 surprised me. This is intended ?
 
 Is it? In the latest version?  Assuming ?ep a void:sparqlEndpoint 
 matches something in the local dataset
 
 SERVICE SILENT ?ep -- failure
 
 evaluates to the join identity (one row, no columns) and ?ep is unbound 
 in that.  This joins with the eval of ?ep a void:sparqlEndpoint.
 
 If not, please submit a JIRA with complete minimal example.

Thank you very much for your help so far!

I really should get into SPARQL algebra. Meanwhile I guess that ?ep should
stay bound if ?ep is bound in the first part of the query and is joined with 
the join identity.

I upgraded to Fuseki 1.0.0 without success regarding this. So here is my JIRA:

https://issues.apache.org/jira/browse/JENA-552

Completely different topic: Has a REPEAT WHILE keyword/feature ever been 
discussed for SPARQL UPDATE in the working group ? See:

http://www.brunni.de/sparql_turing_machine.txt
http://www.brunni.de/searchsparqlendpoints.txt

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail bru...@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel


pgpQQoaw2T_Zs.pgp
Description: PGP signature


Re: SPARQL problem

2013-09-28 Thread Andy Seaborne

On 28/09/13 09:58, Michael Brunnbauer wrote:


hi all

I wonder if something is wrong with this query or with Fuseki 0.2.5.
All variables except ep2 are bound in the result:


Yes - that's what I expect.


select ?ep ?ep2 ?s ?p ?o where {
  BIND ('X' as ?ep)
  {
   select (?ep as ?ep2) ?s ?p ?o where { ?s ?p ?o } limit 1
  }
}

I tried it also with BIND (?ep as ?ep2) instead of select (?ep as ?ep2) but
without success.


Query evaluation is functional - execute the inner parts and combine 
them together.  (1+2) * (4+5) is calc 1+2 and calc 4+5 then pass 3 and 9 
to * to get 27.


Inner part:
BIND ('X' as ?ep)

One row, ?ep is 'X'

Inner part:
select (?ep as ?ep2) ?s ?p ?o where { ?s ?p ?o } limit 1

?ep is unbound so ?ep2 is unbound.


now join them, ?ep is bound on one side (from BIND) not on the other 
(from SELECT).


Andy





Regards,

Michael Brunnbauer




Andy



Re: SPARQL problem

2013-09-28 Thread Michael Brunnbauer

Hello Andy,

On Sat, Sep 28, 2013 at 11:12:28AM +0100, Andy Seaborne wrote:
 Inner part:
 BIND ('X' as ?ep)

This is evaluated separately because BIND ends the graph pattern ?

Another question: If I do something like

 ?ep a void:sparqlEndpoint
 SERVICE SILENT ?ep { ...

then ?ep is not bound if the federation fails. That a failure causes a match
with unbound variables is expected but that ?ep is also unbound in this case
surprised me. This is intended ?

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail bru...@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel


pgpsNRF5qoNKD.pgp
Description: PGP signature


Re: SPARQL problem

2013-09-28 Thread Andy Seaborne

On 28/09/13 14:42, Michael Brunnbauer wrote:


Hello Andy,

On Sat, Sep 28, 2013 at 11:12:28AM +0100, Andy Seaborne wrote:

Inner part:
BIND ('X' as ?ep)


This is evaluated separately because BIND ends the graph pattern ?

Another question: If I do something like

  ?ep a void:sparqlEndpoint
  SERVICE SILENT ?ep { ...

then ?ep is not bound if the federation fails. That a failure causes a match
with unbound variables is expected but that ?ep is also unbound in this case
surprised me. This is intended ?


Is it? In the latest version?  Assuming ?ep a void:sparqlEndpoint 
matches something in the local dataset


SERVICE SILENT ?ep -- failure

evaluates to the join identity (one row, no columns) and ?ep is unbound 
in that.  This joins with the eval of ?ep a void:sparqlEndpoint.


If not, please submit a JIRA with complete minimal example.

ARQ tries to evaluate using a different algorithm - you can try the 
reference query engine (--engine=ref or call QueryEngineRef.register() 
in code) which is a very simple, and hopefully dependable, bottom-up 
materialising evaluation of a query.  It does not scale.


Andy



Regards,

Michael Brunnbauer