Closed JohannesLipp closed 2 years ago
Hi @JohannesLipp !
Thank you for your interest in RML and our tools! The JSONPath specification you refer to is still a draft at IETF which was recently being established from https://goessner.net/articles/JsonPath/. The JSONPath library inside the RMLMapper does not support the new specification yet and therefore not the array slice expression.
You may be able to workaround this issue using FnO functions. The RMLMapper supports a default set of functions, but you can also add your own functions. You can find the default set of functions at: https://rml.io/docs/rmlmapper/default-functions/
If you still have any questions, feel free to reach out!
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Hi @DylanVanAssche thank you very much for your quick reply! We investigated FnO functions in the RML Mapper and successfully implemented these in other use-cases, but: We evaluated the required effort for the JSON indexing as too high, so we actually changed the format of our input files to enable easy processing via default RML JSON-path.
Concretely, we split the list in the input file into two lists containing every other element. Thank you anyway! 🦀
I need to select every n-th element from a JSON array, but it seems that the JSONPath array slice expression "step" is not supported. An example would be
[0:10:2]
to select every other element in the range 0-9.Input JSON:
{ "array": [0,1,2,3,4,5,6,7,8,9] }
RML mapping:
Actual output:
Expected output:
Is there anything we can do about this? Thank you very much in advance!