Solved
I have a HIVE table which contains JSON as a column. I need to extract a struct in this JSON .But Lateral explode is not helping.
The JSON is example is :
{
"app": {
"Id": "123",
"apply": [
{
"flag": "1",
"Product": [
{
"Code": "DZ9e",
"Line": "10000",
"status": "C",
}
{
"Code": "EZ9e",
"Line": "19000",
"status": "C",
}
]
}
}
I need output like
| ID | Flag | Code | Line | Status |
| 123 | 1 | DZ9e | 10000 | C |
| 123 | 1 | EZ9e | 19000 | C |
I have used lateral explode/lalteral inline explode . But it is not giving value in separate rows.
Anybody has any solution

