I'm reading a number of json files each with their own set of records. I can see I need to expose many attributes but without adding hundreds of lines (the index goes to 142). Is there any easy way to go from screengrab below to web site structure at http://reg.bom.gov.au/products/IDT60801/IDT60801.94850.shtml:
When you say index do you mean you have fields which are like observations.data{142}.[attributename] ?
Because that number relates to the number of features in the list, not the number of attributes.
If you explode the observations.data list, you can then expose the attributes to get a similar sort of data structure to the web page. If you are using 2020 or above, you can use the feature cache to automatically populate the attributes to expose.
have a look at the attached. Makes use of the JSONFragmenter to both read the JSON and break it down
have a look at the attached. Makes use of the JSONFragmenter to both read the JSON and break it down
Hi @hkingsbury,
I think this is a great answer to this problem.
Quick question, do your output attributes sort alphabetically even when Sort Attributes = 'None' in the SchemaSetter?
You can save one JSON file to disk and use Import -> From Dataset in AttributeExposer
Hi @hkingsbury,
I think this is a great answer to this problem.
Quick question, do your output attributes sort alphabetically even when Sort Attributes = 'None' in the SchemaSetter?
I faced this exact issue yesterday on a completely unrelated (to this) piece of work. Short answer is reorder fields in attribute manager doesn't change the actual order of the attributes. So the 'none' in the SchemaSetter is not really doing anything.
Here are some other articles on the matter:
https://community.safe.com/s/question/0D54Q000080hC3L/attribute-order-keeping