I'm trying to copy into Redshift some json files with the following structure:
{
"data": [{
"attr1": "value1",
"attr2": "value2",
"attr3": "value3",
},
{
"attr1": "value4",
"attr2": "value5",
"attr3": "value6",
}]
}
The number of array elements is variable.
I've tried using the following jsonpath, but it doesn't work:
{
"jsonpaths": [
"$.data[*].attr1",
"$.data[*].attr2",
"$.data[*].attr3"
]
}
If I use the following jsonpath, it only loads the first object in the array:
{
"jsonpaths": [
"$.data[0].attr1",
"$.data[0].attr2",
"$.data[0].attr3"
]
}
Is there a way to do this?
Thanks!