Hi Team,
I'm trying to create a virtual graph from mysql data source .
I have created a virtual graph through the Stardog studio with auto generated mappings and then made some changes in the default mappings (namespaces and few other predicates) , with that i'm able to write a sparql and get the results.
Attached mapping file.
References : map.ttl (612 Bytes)sqldb.txt (111 Bytes)
Trying to create a same with cmd line by loading the map.ttl file in the following command.
stardog-admin virtual add --name sqlds sqldb.properties map.ttl
Getting below error
WARN 2021-08-22 19:26:16,369 [stardog-user-1] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(68): Unexpected exception was handled by the server
com.stardog.stark.io.InvalidRDF: Expected ':', found '
' [L8]
at com.stardog.stark.io.ParserContext.error(ParserContext.java:232) ~[stardog-stark-io-api-7.7.1.jar:?]
at com.stardog.stark.io.ParserContext.error(ParserContext.java:220) ~[stardog-stark-io-api-7.7.1.jar:?]
at com.stardog.stark.io.IOParserContext.verifyCharacterOrFail(IOParserContext.java:226) ~[stardog-stark-io-api-7.7.1.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parseQNameOrBoolean(TurtleParser.java:634) ~[stardog-stark-io-turtle-7.7.1.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parseValue(TurtleParser.java:507) ~[stardog-stark-io-turtle-7.7.1.jar:?]
at com.stardog.stark.io.trig.TrigParser.parseGraph(TrigParser.java:121) ~[stardog-stark-io-trig-7.7.1.jar:?]
at com.stardog.stark.io.trig.TrigParser.parseStatement(TrigParser.java:72) ~[stardog-stark-io-trig-7.7.1.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parse(TurtleParser.java:97) ~[stardog-stark-io-turtle-7.7.1.jar:?]
at com.stardog.stark.io.RDFParsers.read(RDFParsers.java:340) ~[stardog-stark-io-api-7.7.1.jar:?]
at com.complexible.stardog.virtual.api.StardogMappingSyntaxParser.parse(StardogMappingSyntaxParser.java:128) ~[stardog-virtual-api-7.7.1.jar:?]
at com.complexible.stardog.virtual.api.StardogMappingSyntaxParser.parse(StardogMappingSyntaxParser.java:111) ~[stardog-virtual-api-7.7.1.jar:?]
at com.complexible.stardog.virtual.api.StardogMappings.read(StardogMappings.java:47) ~[stardog-virtual-api-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsMappings.parseOrGenerateMappings(RdbmsMappings.java:124) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsMappings.parseOrGenerateMappings(RdbmsMappings.java:107) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsMappings.parseOrGenerateMappings(RdbmsMappings.java:92) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.createInternal(RdbmsVirtualGraphFactory.java:98) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.createInternal(RdbmsVirtualGraphFactory.java:44) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.AbstractVirtualGraphFactory.createWithAvailability(AbstractVirtualGraphFactory.java:120) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.vega.AbstractVirtualGraphFactory.create(AbstractVirtualGraphFactory.java:100) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:658) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:644) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.addGraphInternal(DefaultVirtualGraphRegistry.java:387) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.addGraph(DefaultVirtualGraphRegistry.java:321) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.addGraph(SecuredVirtualGraphRegistry.java:204) ~[stardog-virtual-core-7.7.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:570) ~[stardog-virtual-protocols-http-server-7.7.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:287) ~[stardog-virtual-protocols-http-server-7.7.1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.7.1.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.7.1.jar:1.7.1]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.7.1.jar:1.7.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Could any one please advise, why the same mapping data (file) is working if loaded in stardog studio, but giving an error while using it in the stardog-admin cmd line ?