Invalid variable: classname1
The detailed stack trace for the error is:
java.lang.IllegalArgumentException: Invalid variable: classname1
at com.complexible.stardog.virtual.api.RDFGenerator$TemplateParser.valueProviderFor(RDFGenerator.java:119)
at com.complexible.stardog.virtual.api.RDFGenerator$TemplateParser.insertPlaceholders(RDFGenerator.java:94)
at com.complexible.stardog.virtual.api.RDFGenerator$TemplateParser.parseTemplate(RDFGenerator.java:129)
at com.complexible.stardog.virtual.api.RDFGenerator$TemplateParser.access$100(RDFGenerator.java:76)
at com.complexible.stardog.virtual.api.RDFGenerator.<init>(RDFGenerator.java:63)
at com.complexible.stardog.virtual.api.CSVMapper.map(CSVMapper.java:141)
at com.complexible.stardog.virtual.cli.VirtualGraphImport.execute(VirtualGraphImport.java:148)
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:70)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:187)
Nothing is in the log. This happened on Stardog 6.1.3 and 6.2.1.
What version? It's working for me:
C:@git\stardog\dist>type Sheet2a.csv
classname1,classname2,relevance
classname1indiv,classname2indiva,1
classname1indiv,classname2indivb,0.5
I just inspected the code. There's nothing that checks the OS type. The default separator is comma. The only way to change it is to set a csv.separator property. I see you're not using a property file on the command line. I am at a loss for an explanation.
I will add some code that improves the error message, indicating what the available columns are. In this case it would have indicated a single column name "classname1,classname2,relevance", which might have clued us into the delimiter issue.
I think that it was more about some non-printable characters that were inserted by Excel's .csv output and/or kept by TextMate, rather than the actual data.
When I moved to Excel tab-delimited (which creates a .txt file) and then edited with TextEdit, the world was good. In that case, I did add a properties file.
That makes sense. Given that the field that Stardog was complaining about was the first column, it could have been a byte order marker. I'll take a look to see that we correctly handle those.