0

My array string in hive looks like this.

[[a,b],[c,d], [e,f]]

Output should be

[a,b]

[c,d] 

[e,f]

I tried using explode function and lateral view also. Am getting the output as [a,b], [c,d],[e,f] in one row. I need the output like having each string in one row as above.

o-90
  • 17,045
  • 10
  • 39
  • 63
Krishna
  • 153
  • 1
  • 5
  • 12
  • Check this question http://stackoverflow.com/questions/20667473/hive-explode-lateral-view-multiple-arrays . – Abhi Apr 23 '15 at 18:11
  • explode() takes in an array (or a map) as an input and outputs the elements of the array (map) as separate rows. UDTF's can be used in the SELECT expression list and as a part of LATERAL VIEW. This is how explode is defined in tutorial. I want to know if i can get the output with explode without using custom UDFs. – Krishna Apr 24 '15 at 06:16

0 Answers0