Open shawnhind opened 2 years ago
Hi @shawnhind !
Thanks for your issue! This seems like an issue with how the paths to files are resolved when using relative paths. Do you have the mapping file and CSV file still?
We have the same issue. When setting -mappingfile to a subdirectory and place the data files in that same subdirectory we have the same error. The mappingfile is found and being parsed, but the files are not found there (the csvw:url is not having relative paths):
<#Arbeidsovereenkomst>
a rr:TriplesMap;
rml:logicalSource [
rml:source [
a csvw:Table;
csvw:url "Dienstverband.txt" ;
csvw:dialect [
a csvw:Dialect;
csvw:delimiter ";"
]
];
rml:referenceFormulation ql:CSV;
];
My mapping file just had the logical source someFile.csv. I pointed the RecordsFactory class to the path where I had this file on my system. In my case it was in /tmp/ directory.
When the process would get to LocalFileAccess:getInputStream it would fail on line 40 calling org.apache.commons.io.FileUtils.getFile with a MethodNotFound exception for String[]. In this case it was trying to pass it the base path and the path. This however failed.
If I instead changed my mapping file to have the full path /tmp/someFile.csv it then worked, however I was not able to get it to work using a relative path.
When this method was being called:
this.path on the LocalFileAccess object was: "someFile.csv" this.basePath on the LocalFileAccess object was "/tmp/"