Re: how to read array enclosed within square brackets

2014-09-23 Thread Ankita Bakshi
Thanks Xuefu. I was hoping I don't have to do that. We create this file by serializing java array so was hoping that it would be a common case to handle arrays with square brackets. Thanks, Ankita On Mon, Sep 22, 2014 at 7:55 PM, Xuefu Zhang wrote: > Hive doesn't know it needs to skip your squa

Re: how to read array enclosed within square brackets

2014-09-22 Thread Xuefu Zhang
Hive doesn't know it needs to skip your square brackets, so you numbers are really [1, 2, and 3]. [1 and 3] cannot be parsed to numbers, so they become null. I think you interpret the second column as [1, 2, 3] of type string. Then you can remove the brackets, and use a UDF (write your own if the