RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
147 stars 61 forks source link

Test case of the array of array in json #130

Closed bilalbenma closed 2 years ago

bilalbenma commented 3 years ago

I'm trying to map the JSON file to RDF, The problem that I faced is the following: I can not iterate correctly in order to reach all the attributes inside the skills array. I tried all the solutions presented in: RML Mapper for array of array in json, but I still faced the same issue. The following code represents a part of the JSON file that I tried to generate from the RDF file. Note1: to convert the rml mapping file to RDF I used the SDM-RDFizer. Note2: Can we consider that the SDM-RDFizer cannot deal with the array of the array test cases. Note3: I used the following iterator to reach the skills array: $.characters[*].skills.[*]

{
    "characters": [
        {
            "uid": "kuyD47M35RL3iFv55uJi9i",
            "skill_name": "Software Development",
            "proxy_name": "",
            "syn_names": "",
            "has_direct_child_skills": 1,
            "has_indirect_child_skills": 1,
            "has_parent_skills": 0,
            "has_siblings_skills": 0,
            "has_relatives_skills_categories": 0,
            "rating_type": 1,
            "rating_legend": 25,
            "parent_name": "",
            "description": "",
            "skills": [
              {
                "uid": "2mJSma8Qzm5p7hHRKJfk3Q",
                            "skill_id": "4gzJv6MYGhidvV4WRnY6EV"
              }
              ]

        }
    ]
}
thomas-delva commented 2 years ago

Hi, with the RMLMapper, using the iterator $.characters[*].skills.[*] allows me to generate RDF as expected.

I used this mapping: mapping.rml.ttl And got the following triple as output:

<http://example.com/4gzJv6MYGhidvV4WRnY6EV> <http://example.com/uid> "2mJSma8Qzm5p7hHRKJfk3Q".

Does this answer your question? If you have an example of the output you want I could offer more complete help.

no-response[bot] commented 2 years ago

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.