drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rahul challapalli <challapallira...@gmail.com>
Subject Using CTAS with nested structures
Date Mon, 23 Feb 2015 23:29:18 GMT

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

select cast(d.map.col1 as decimal(5,2)) ,  cast(d.map.col2 as double)) from

I am looking for something on the below lines :

select cast(m1 as map(col1:decimal, col2:double)) from `data.json`;

- Rahul

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message