Replies: 1 comment
-
Okay, so I apparently had misunderstood how the example custom function works. The expected input was "POINT (50.2 5.3)" and output "50.2", not the other way around. Realising this solved the issue of the function not working. However, the problem remains that the example custom function cannot be used together with functions in the grel namespace without making these adjustments: In custom functions.ttl change namespace of the Include both the custom functions and grel-functions: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could someone please help me understand how to create custom functions for rml-mapper?
I'm using yarrrml and rmlmapper-java for xml -> rdf conversion. I have been able to use the pre-defined functions from grel:http://users.ugent.be/~bjdmeest/function/grel.ttl# and idlab-fn: http://example.com/idlab/function/ namespaces but I have not managed to add any custom functions. I have tried getting started with the example for dynamic loading provided here: https://github.com/RMLio/rmlmapper-java, but I'm not able to make it work. I have probably misunderstood something?
I have all the relevant files in same folder:
CustomFunctions.java (copied from the example)
functions.ttl (copied from the example)
rules.yml
rules.rml.ttl (generated with yarrrml-parser)
I have installed yarrrm-parser and rmlmapper-java locally. I use these commands:
As per the example, the expected output is "POINT (50.2 5.3)", but I get "50.2", so it seems that the function is not called at all.
output in dump.ttl:
<http://example.com/temp/30.12.1993%2F1501> <http://example.com/temp/id> "50.2".
Furthermore, if I try to use both a custom function and a pre-defined function from grel-namespace (adding the commented lines in rules.yml), the rmlmapper throws an error.
Beta Was this translation helpful? Give feedback.
All reactions