NenadPantelic / cave-for-devs

Collection of the useful resources, tutorials and exercises for cs students and fresh graduates, but also for all the professionals who want to work on some challenges and find some stuff for maintaining brain and fingers active.
MIT License
0 stars 1 forks source link

AS: Create data converter (JSON, SQL, CSV, XML) #11

Open NenadPantelic opened 3 years ago

NenadPantelic commented 3 years ago

Create data converter script/app that will take file of some of the following types:

And it will convert it to some other target types (on the mentioned). In case the target format is SQL, the database and table can be provided or otherwise, it should be created (take care of the privileges). In case some the fields in JSON or XML are actually embedded data type (e.g. address in user consists of multiple fields, it is another JSON objects) and the target format is csv, flatten the nested object. E.g.:

{
"firstName":"string",
"lastName": "string",
"address":{
   "country":"string",
   "city" :"string",
   "street":"string",
  "apartmentNo":0
  }
}

should convert to columns:firstName, lastName, country, city....