You can translate the question and the replies:

JSON file within a ZIP --- can access but the formatting is odd ---

I have created a data source that pulls in a zip file with a JSON file inside it and I am strugging to parse it with a custom tupple pattern. No matter what tuple root I use Denodo fails to display it -- it just blanks out and no error message provided. there is a "meta" section at the top that might be causing the issue. Is there anywy to skip it and just ingest starting at the "results" section? I incuded only the first item in that section as an example. > { "meta": { "disclaimer": "Do not rely on openFDA to make decisions regarding medical care. While we make every effort to ensure that data is accurate, you should assume all results are unvalidated. We may limit or otherwise restrict your access to the API in line with our Terms of Service.", "terms": "https://open.fda.gov/terms/", "license": "https://open.fda.gov/license/", "last_updated": "2022-04-08", "results": { "skip": 0, "limit": 131679, "total": 131679 } }, "results": [ { "product_ndc": "72516-013", "generic_name": "Dextroamphetamine Saccharate, Amphetamine Aspartate, Dextroamphetamine Sulfate and Amphetamine Sulfate", "labeler_name": "Oryza Pharmaceuticals Inc.", "dea_schedule": "CII", "brand_name": "Dextroamphetamine Saccharate, Amphetamine Aspartate, Dextroamphetamine Sulfate and Amphetamine Sulfate", "active_ingredients": [ { "name": "AMPHETAMINE ASPARTATE MONOHYDRATE", "strength": "3.75 mg/1" }, { "name": "AMPHETAMINE SULFATE", "strength": "3.75 mg/1" }, { "name": "DEXTROAMPHETAMINE SACCHARATE", "strength": "3.75 mg/1" }, { "name": "DEXTROAMPHETAMINE SULFATE", "strength": "3.75 mg/1" } ], "finished": true, "packaging": [ { "package_ndc": "72516-013-01", "description": "100 TABLET in 1 BOTTLE (72516-013-01)", "marketing_start_date": "20201019", "sample": false } ], "listing_expiration_date": "20221231", "openfda": { "manufacturer_name": [ "Oryza Pharmaceuticals Inc." ], "rxcui": [ "541363", "541878", "541892", "577957", "577961", "1009145" ], "spl_set_id": [ "acd27181-a3f3-4c38-85d8-029a4a82e7c2" ], "is_original_packager": [ true ], "unii": [ "6DPV8NK46S", "G83415V073", "JJ768O327N", "O1ZPV620O4" ] }, "marketing_category": "ANDA", "dosage_form": "TABLET", "spl_id": "b2089df4-ef8a-40ff-e053-2995a90a03e0", "product_type": "HUMAN PRESCRIPTION DRUG", "route": [ "ORAL" ], "marketing_start_date": "20201019", "product_id": "72516-013_b2089df4-ef8a-40ff-e053-2995a90a03e0", "application_number": "ANDA210293", "brand_name_base": "Dextroamphetamine Saccharate, Amphetamine Aspartate, Dextroamphetamine Sulfate and Amphetamine Sulfate", "pharm_class": [ "Central Nervous System Stimulant [EPC]", "Central Nervous System Stimulant [EPC]", "Central Nervous System Stimulant [EPC]", "Central Nervous System Stimulant [EPC]", "Central Nervous System Stimulation [PE]", "Central Nervous System Stimulation [PE]", "Central Nervous System Stimulation [PE]", "Central Nervous System Stimulation [PE]" ] },
user
08-04-2022 11:43:44 -0400

2 Answers

you can ignore... I see the resulting views were opening on another screen.
user
08-04-2022 11:47:46 -0400
Hi, When creating a base view from a JSON data source with ‘**JSON root**’ option, Virtual DataPort would extract all the data from the JSON file and represent each section as either a Register or an Array. In this scenario, as per the provided JSON structure, it would extract both ‘meta’ and ‘results’ sections represented as a Register and an Array respectively. However, if you would want to extract only the ‘results’ section of the JSON file, you could select the ‘**Tuple root**’ option and provide the value as ‘**/JSONFile/results**’. This would expand the ‘results’ array and represent all the elements as a column in the output. You can have a look at the JSON Sources section under the Virtual DataPort Administration Guide if you need more information on accessing JSON data sources. You could also read a similar Q&A answer [here](https://community.denodo.com/answers/question/details?questionId=9064u000000wkAhAAI&title=Integration+of+a+Json+file+with+a+special+structure). Hope this helps!
Denodo Team
11-04-2022 03:50:06 -0400
You must sign in to add an answer. If you do not have an account, you can register here