Hi,
I want to able to read from a nested json file, cast individual fields, and
still be able to maintain the nested structure. If this is possible, how do
I compose my CTAS query?
Example :
{
"map" : {"col1":12.2, "col2":25.5}
}
The below query generates a flat parquet, but I still want to maintain the
nestedness
select cast(d.map.col1 as decimal(5,2)) , cast(d.map.col2 as double)) from
`data.json`;
I am looking for something on the below lines :
select cast(m1 as map(col1:decimal, col2:double)) from `data.json`;
- Rahul