Closed mvanbrab closed 2 years ago
Do you get errors when you turn on debugging?
I'm not an expert but could it be due to the ~iri
? Isn't that a datatype declaration? I don't think the value o
in Column C is a valid IRI
@pheyvaer Was using Matey... Output from commandline when adding -v option:
08:58:56.277 [main] DEBUG b.ugent.rml.records.CSVRecordFactory.getParserForNormalCSV(89) - Could not parse CSV inputstream
java.lang.IllegalArgumentException: A header name is missing in [ColumnA, , ColumnC]
at org.apache.commons.csv.CSVParser.createHeaders(CSVParser.java:501)
at org.apache.commons.csv.CSVParser.<init>(CSVParser.java:412)
at org.apache.commons.csv.CSVParser.<init>(CSVParser.java:378)
at org.apache.commons.csv.CSVParser.parse(CSVParser.java:279)
at org.apache.commons.csv.CSVParser.parse(CSVParser.java:234)
at be.ugent.rml.records.CSVRecordFactory.getParserForNormalCSV(CSVRecordFactory.java:87)
at be.ugent.rml.records.CSVRecordFactory.getRecords(CSVRecordFactory.java:46)
at be.ugent.rml.records.RecordsFactory.getRecords(RecordsFactory.java:136)
at be.ugent.rml.records.RecordsFactory.createRecords(RecordsFactory.java:70)
at be.ugent.rml.Executor.getRecords(Executor.java:409)
at be.ugent.rml.Executor.executeWithFunctionV5(Executor.java:153)
at be.ugent.rml.Executor.executeV5(Executor.java:140)
at be.ugent.rml.cli.Main.main(Main.java:318)
at be.ugent.rml.cli.Main.main(Main.java:40)
08:58:56.280 [main] DEBUG be.ugent.rml.cli.Main .writeOutputTargets(353) - Writing to Targets: [<rmlmapper://default.store>]
08:58:56.282 [main] DEBUG be.ugent.rml.cli.Main .writeOutputTargets(368) - Exporting to default Target
08:58:56.283 [main] INFO be.ugent.rml.cli.Main .writeOutputUncompressed(470) - 0 quad was generated for default Target
08:58:56.283 [main] INFO be.ugent.rml.cli.Main .writeOutputTargets(396) - No results!
@valentinoli ex:o is a valid iri.
A header name is missing in [ColumnA, , ColumnC]
This is the problem. The header of the CSV file is invalid.
Consider it a feature request to make the mapper robust against the absence of a header value for a column. Skip that column in such cases. Useful in cases where the CSV file comes from an external source, not under own control.
Is it allowed to have an empty header value according to the CSV spec?
Is it allowed to have an empty header value according to the CSV spec?
Totally allowed https://datatracker.ietf.org/doc/html/rfc4180#section-2
😠Ok, then this is a bug in the RMLMapper.
A fix will be available in the next release which will ignore columns without a name in the CSV header.
This was released in 4.13.0, closing.
Handling this issue.csv
with this YARRRML for example
gives an empty output.