oeg-upm / mapeathor

Translator of spreadsheet mappings into R2RML, RML or YARRRML
https://morph.oeg.fi.upm.es/tool/mapeathor
Apache License 2.0
30 stars 10 forks source link

Invalid RML file #23

Closed nleguillarme closed 2 years ago

nleguillarme commented 3 years ago

Hi. Generating RML rules from my spreadsheet results in an invalid RML file (according to RMLMapper). I managed to identify one of the problems, not the other.

  1. CSV appears to be an invalid data format. Replacing 'CSV' by 'csv' as specified in YARRRML specification works. From the attached spreadsheet, I am able to generate YARRRML rules, then to convert these rules to RML rules using yarrrml-parser, then to generate RDF triples using RMLMapper.
  2. However, if I try to generate RML rules directly from the spreadsheet, then RMLMapper returns the following error during RDF generation:
    10:40:42.691 [main] ERROR be.ugent.rml.cli.Main               .main(179) - Unable to parse mapping rules as Turtle. Does the file exist and is it valid Turtle?
    org.eclipse.rdf4j.rio.RDFParseException: Not a valid (absolute) IRI: #CONSUMER [line 11]

    mapping.xlsx s.tsv.txt

fpriyatna commented 3 years ago

Hi,

As for the second issue, I also encountered the same error. I added an empty namespace and use the command I mentioned in issue #21 and it worked for me. You can also add your own default namespace directly in the generated RML mapping file.

anaigmo commented 3 years ago

I've been struggling with this issue for months now without finding the bug, thanks @fpriyatna and @nleguillarme for identifying and pointing it out :) It will be fixed in next versions

anaigmo commented 3 years ago

Hi, this should be fixed, let me know if something comes up

nleguillarme commented 3 years ago

Hi, I just tried the new version (using the Docker image) and the issue is still there. When using RMLMapper-java :

docker run --rm -v $(pwd):/data rmlmapper -m test.rml.rml.ttl

results in

10:16:01.809 [main] ERROR be.ugent.rml.cli.Main .main(191) - Unable to parse mapping rules as Turtle. Does the file exist and is it valid Turtle?
org.eclipse.rdf4j.rio.RDFParseException: Not a valid (absolute) IRI: #EMPLOYED [line 10]

Please note that this time I tried with your test example available in the data folder.

nleguillarme commented 2 years ago

Hi, any progress on this issue?

anaigmo commented 2 years ago

Hi! I tried again, and I don't get the error running rmlmapper (rmlmapper-4.13.0) any longer. I generated RML files with the last version of both pypi and docker and it works. I leave the files here so you can try: Input XLSX, output RML mapping and test data

test_rml_mapeathor.zip

nleguillarme commented 2 years ago

From my latest tests, it appears that everything works just fine. Thank you.

anaigmo commented 2 years ago

Thank you!