Closed MathiasVDA closed 9 months ago
Hello, We found a bug indeed in how the lookup function is called, and are fixing it. We'll keep you informed. Best regards, Gerald
We fixed the issue and have made a new release (6.2.2), also available on Docker. Can you try again with the new version?
Thank you for the fast intervention. I'm one step further. But now I have this error for which I think that there is still a functional issue:
14:10:21.198 [main] ERROR b.u.k.idlabFunctions.IDLabFunctions .lookupWithDelimiter(912) - Column index out of boundaries; inputFile: "map-opType.csv", fromColumn: "1", toColumn: "2"
14:10:21.226 [main] ERROR be.ugent.rml.cli.Main .run(416) - Not a valid (absolute) IRI: nullera-domain/BE_FIZG
Sorry I just realized that the columns indexing is 0 based. That explains the first ERROR in my previous message. Changing to 0 and 1 as column indexes solves it.
I haven't found a solution/reason for the second ERROR yet.
Ok second error is fixed and had nothing to do with the initial problem but was a RML typo on my side. So I can confirm that your new deploy functions correctly on my side! Thanks again
Hello,
I'm trying to convert a JSON file into ttl using rmlmapper.
I use the rmlio/rmlmapper-java docker image with command:
docker run --rm -v "%cd%":/data rmlio/rmlmapper-java -m operational-points.rml.ttl -o operationele-punten-van-het-netwerk.ttl -s turtle -v
My input json file can be downloaded from here: https://infrabel.opendatasoft.com/api/explore/v2.1/catalog/datasets/operationele-punten-van-het-netwerk/exports/json?lang=en&timezone=UTC
Here is the RML ttl file I've created:
Here is the relevant debug information:
If I understand all the code correctly, the lookup function is declared here: https://github.com/FnOio/idlab-functions-java/blob/d7aa5443f23479c9335537701db84ab301f479f7/src/main/java/be/ugent/knows/idlabFunctions/IDLabFunctions.java#L763
public static String lookup(String searchString, String inputFile, Integer fromColumn, Integer toColumn)
It expects 2 strings and 2 integers.
In the debug log I see:
with arguments '('http://example.com/idlab/function/inputFile' -> 'map-opType.csv')('http://example.com/idlab/function/toColumn' -> '2')('http://example.com/idlab/function/fromColumn' -> '1')
So it seems that my 2 integers are interpreted as strings. But I did declare them as integer in my RML file:
When I test
[rr:constant 1; rr:datatype xsd:integer]
without a function, RMLmapper exports a clean integer in the resulting file.So my guess is that somewhere in between my integer is converted into a string?