Given the below json object
{
"player": {
"francesco totti": {
"position": "forward"
},
"andrea pirlo": {
"position": "midfielder"
}
}
}
I would like to import the above file into Redshift as the below rows
name, position
"franceso totti", "forward"
"andrea pirlo", "midfielder"
The thing is the 'player' object has a dynamic number of objects each hour(cadence of when I import into Redshift). For example, the next hour run may look like the following.
{
"player": {
"fabio cannavaro": {
"position": "defender"
}
}
}
Is it possible to use a JSONPaths file to import this file every hour or does it require preprocessing?