I have a json file that has 9 possible combinations of columns (based on web site actions). I’m trying to use Json Extractor to load this file into a sql database. I was able to get it working so that it reads all the records based on the generated xsd schema, but that is based on the first row in the file which doesn’t contain all the possible combinations. It is processing all the rows correctly for this smaller set, and I’ve gotten it also to map subtrees of the json data. But there are other pieces of data that are falling off.
I looked at the generated xsd schema and it has 61 rows total. I tried to edit the xsd to contain all the columns I wanted (has 115 rows now), but when I try to change the JsonExtractor to use this xsd, I get an error message in Clover: Error occured during schema reading. Reason: com.cloveretl.gui.dT:Error while initializing tree.
Clicking on details gives: com.cloveretl.gui.dT: Error while initializing tree
Caused by: org.apache.xmlbeans.XmlException: sandbox://Guruse/meta/stats14_json_serena.xsd:0: error: cvc-complex-type.2.4a: Expected elements ‘attribute@http://www.w3.org/2001/XMLSchema attributeGroup@http://www.w3.org/2001/XMLSchema anyAttribute@http://www.w3.org/2001/XMLSchema’ instead of ‘complexType@http://www.w3.org/2001/XMLSchema’ here in element complexType@http://www.w3.org/2001/XMLSchema
And then when I click on OK it brings up the same blank window where I need to generate tree structure before I can get started.
What can I do? How can I get Clover to recognize that each row in the file has the potential to need more or less mappings?