Unable to parse R2RML view query [[SELECT a.ObjectId, a.VersieId, a.StraatnaamObjectId, g.ObjectId as gemeenteID, a.Huisnummer, a.Busnummer, a.Postcode, a.Officieus, a.AdresStatus FROM Adres a LEFT JOIN Straatnaam s on a.StraatnaamObjectId=s.ObjectId LEFT JOIN Gemeente g on s.GemeenteObjectId=g.ObjectId ]]: From line 3, column 6 to line 3, column 10: Table 'ADRES' not found
Table ‘Adres’ is available.
Forgot to mention: connecting to SQLserver (Microsoft).
You might want to try quoting the table name. The default is to use MySql quoting with the backtick but you can change that to double quote with the new option parser.mysql.quoting.
parser.mysql.quoting
If unspecified, R2RML views (using rr:sqlQuery) will be parsed using the MySQL convention of treating backtick as the identifier quote character. If set to ANSI, the ANSI SQL convention of treating a double quote as the identifier quote character will be used.
Possibly. I'm guessing it has to do with the default collation. I'm basing this completely on the table being named 'Adres' but the error saying it can't find 'ADRES'.
You might be able to work around it if you are able to change the collation for your database to be case insensitive. See this StackOverflow question for how to do that.
Thanks. For some reason I thought it was the difference between ANSI quoting and whatever the hell quoting that particular db uses. I also didn’t thing brackets preserved case but only special chars like spaces but I’m probably wrong on that. I haven’t used SQL Server in a long time.
./stardog-admin virtual import CRAB2 /Users/Paul/Desktop/Projects/CRAB/stardog/oslo2.properties /Users/Paul/Desktop/Projects/CRAB/stardog/mappings/Adres2.ttl --format r2rml -v
Unable to parse R2RML view query [[SELECT * FROM [Adres] LEFT JOIN Straatnaam s on a.StraatnaamObjectId=s.ObjectId LEFT JOIN Gemeente g on s.GemeenteObjectId=g.ObjectId ]]: Encountered "FROM [" at line 1, column 10
The detailed stack trace for the error is:
com.complexible.stardog.cli.CliException: Unable to parse R2RML view query [[SELECT * FROM [Adres] LEFT JOIN Straatnaam s on a.StraatnaamObjectId=s.ObjectId LEFT JOIN Gemeente g on s.GemeenteObjectId=g.ObjectId ]]: Encountered "FROM [" at line 1, column 10
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:73)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182)
Caused by: com.complexible.stardog.StardogException: Unable to parse R2RML view query [[SELECT * FROM [Adres] LEFT JOIN Straatnaam s on a.StraatnaamObjectId=s.ObjectId LEFT JOIN Gemeente g on s.GemeenteObjectId=g.ObjectId ]]: Encountered "FROM [" at line 1, column 10
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:490)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:322)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPost(BaseHttpClient.java:638)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addOrUpdate(HttpVirtualGraphAdminClientImpl.java:233)
Saw that but figured the Stardog parsing might be ok with double quote quoting and let it through but the database server would have to accept the quoting style as well.
Paul,
This appears to be a new bug related to the schema handling that’s only affecting SQL Server. It’s not related to table casing or quoting but the lack of metadata available for the table due to a missing schema search path. We will fit it in the next 5.0 release.
Jess