0

Here is my input json data file

{"uq_id" : "12rtyADF",
 "item_ids": {"item_id" : "123",
              "item_name" : "telephone"},
 "path" : ["1|2|6|3"],
 "time" : "20150818150000" }

{"uq_id" : "1234yADF",
 "item_ids" : {},
 "time" : "20150818150000"}
{"uq_id" : "1er45ADF",
 "item_ids" : {},
 "path" : ["1|2|6|3"] }

I would like to convert this to csv or txt format as below:

----------------------------------------------------------------------------
   uq_id  | item_ids_itemid | item_ids_itemname | path      | time
----------------------------------------------------------------------------
 12rtyADF | 123             | telephone         | "1|2|6|3" | 20150818150000
 1234yADF |                 |                   |           | 20150818150000
 1er45ADF |                 |                   | "1|2|6|3" |

Please note that all field in the input file are not mandatory except uq_id.

request is to read the json file and load to oracle DB. Was thinking if json file can be converted to csv or text then its easy to load to oracle DB. Oracle version is 11g.

2
  • 1
    Can you post what you have tried so far? Commented Aug 18, 2015 at 19:41
  • 2
    Why not pull the JSON into Python, deserialize it there, then have Python update Oracle? That way you don't mess with a CSV. Here's how to use JSON in Python stackoverflow.com/questions/2835559/…, and how to have Python access Oracle: stackoverflow.com/questions/3521692/… Commented Aug 18, 2015 at 19:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.