RML debugging guidelines

Below you find some guidelines to help you debug your RML rules.

Are your RML rules valid Turtle?

Make sure that your RML rules are valid Turtle. You can use http://ttl.summerofcode.be/ for that. Your processor normally will provide more information your RML rules are invalid. For example, the RMLMapper outputs the following error when the provided RML rules are invalid Turtle: [main] ERROR be.ugent.rml.cli.Main .main(179) - Unable to parse mapping rules as Turtle. Does the file exist and is it valid Turtle?

Can your processor access your data?

Make sure that the processor can access the data that is used in the RML rules. Be aware of relative paths. Your processor normally will provide more information when a data source is not found or cannot be accessed. For example, the RMLMapper throws the following error when the file data.json is not found the directory /tmp which is the current working directory: [main] ERROR be.ugent.rml.cli.Main .main(312) - /tmp/data.json (No such file or directory)

Are your references correct? Can they extract all data values?

When using a reference that does not return any data, no RDF will be generated for that reference. Be sure to verify that your references are correct and that they extract all desired data values. There are online tools that let you verify your references. For example, for XPath there is https://www.freeformatter.com/xpath-tester.html and for JSONPath there is https://jsonpath.com/. Your processor normally will provide more information when a reference does not provide any data. For example, the RMLMapper outputs the following warning (when debugging is enabled) when the attribute text does not provide data for a JSON object: [main] WARN be.ugent.rml.records.JSONRecord .get(82) - No results for path: $['person']['text'] for path $['person']['text']

Did you check the examples?

There are a lot of examples available. You can find them as tutorials on our website or as test cases in our processors, such as the RMLMapper and the RMLStreamer. One of these examples might do exactly what you are looking for, so be sure to have a look.

Did you run the processor with debugging enabled? What are the errors?

Our processors have the option to output debug information. This can help you in identifying why your rules are not generating the expected RDF. For example, the RMLMapper has the options -v, -vv and so on, where more vs results in more debug information. Inspect this information to see if anything unexpected is happening, including errors.