I have data saved in a database, Microsoft SQL Server 2014.
What I need to do is to download specific data - query written and is working - to analyze these data. One of the columns is in json format, with following structure
{"name":{"meta_id","actualValues":{"item1":{"name":name,"value":value},
"item_2":{"name":name,"value":value_2},
"item_3":{"name":name,"value":value_3},
"item_n":{"name":name,"value":value_n},},
"setValues:{"item1":{"name":name,"value":value},
"item_2":{"name":name,"value":value_2},
"item_3":{"name":name,"value":value_3},
"item_n":{"name":name,"value":value_n},}
}
The nested json file includes several hundreds of parameter and corresponding values
I managed to connect my database with python and control the query inside python. But if I want to analyze my data I need to convert the structure from the nested json to relational data. Doing this in python takes a very long time for few thousand rows. So I tried to convert the json inside the Database. The expected output shall look like this
The blue columns shall represent "actualValues" and the yellow columns the "setValues". The name_X shall represent the name for item_x I found the following link which gives some help about json_value and json_query.
However this functions only work in SQL Server higher than 2016. Unfortunately I just have the 2014 version.
Is there any way to convert a nested json into relational data, i.e. into a nice table, without a time consuming process?
For any kind of help I would be thankful