Requirement: Parse JSON values into rows
JSON:
{
"uid":"2EDA9DC1D4",
"m_lg_loc": "ml_0_49_2965_12990434_1450,ml_0_49_2965_12991888_1450,ml_0_49_2965_12997254_682,ml_0_49_2965_12997940_453",
"codec": "PMMMU,G726-32,PMMMA,A729a,tel",
"trv_dev": "1,10,2",
"geoipp": {
"area_code": 703,
"location": [
-77.2223,
38.94990000014
]
}
}
Expected Output:
Need m_lg_loc multiple values into rows
ml_0_49_2965_12990434_1450
ml_0_49_2965_12991888_1450
ml_0_49_2965_12997254_682
ml_0_49_2965_12997940_453
Similarly for
codec
PMMMU
G726-32
PMMMA
A729a
tel
location
-77.2223
38.94990000014
Tried:
select JSON_EXTRACT_PATH_TEXT($1, uid) as uid
,JSON_EXTRACT_PATH_TEXT($1, 'm_lg_loc') as m_lg_loc
from /path/abc.json (FILE_FORMAT=>JSON_FORMAT)