I would run this query:
SELECT DISTINCT ?id str(?name)
but Fuseki give me this error: This line is invalid.Expected ( VAR1...
I would need a string value of ?name
.
Asked
Active
Viewed 101 times
1

Stanislav Kralin
- 11,070
- 4
- 35
- 58

Kebby
- 15
- 4
1 Answers
0
I suppose you are talking about something like this.
This message is a warning produced by Fuseki component called YASGUI (or rather YASQE).
You have two options:
Use more conformant syntax, i. e.
SELECT DISTINCT ?id (str(?name) AS ?str_name)
etc.Ignore this warning and run your query, Jena ARQ should accept it and return a result.

Stanislav Kralin
- 11,070
- 4
- 35
- 58
-
Why should ARQ accept it? Jena ARQ follows the SPARQL spec and will lead to a syntax error. You can check always on http://sparql.org/query-validator.html which is backed by Apache Jena ARQ. – UninformedUser Jun 29 '17 at 19:55
-
1@AKSW, perhaps I'm misunderstanding Apache Jena Fuseki architecture, but just try to press the button in the top right corner (even if yellow exclamation mark is displayed). – Stanislav Kralin Jun 29 '17 at 20:03
-
1@AKSW, probaly [1](https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/ARQ.html#setStrictMode--) and [2](https://github.com/apache/jena/blob/cc038809fb622779933831011909714e22ef494c/jena-cmds/src/main/java/arq/cmdline/CmdARQ.java#L54). – Stanislav Kralin Jun 29 '17 at 20:38
-
1Fuseki runs with extended SPARQL syntax. There are not many extensions and they are mostly for legacy reasons and have been replaced by SPARQL 1.1 constructs. – AndyS Jun 29 '17 at 20:48
-
@StanislavKralin,AndyS Oh, I didn't know - always thought that the whole Jena stack works on SPARQL 1.1 by default. Cheers – UninformedUser Jun 30 '17 at 06:29