Reply
New Contributor
Posts: 5
Registered: ‎01-26-2018
Accepted Solution

array?

Hello:

 

I have table where one column is type (array<string>)

 

elements of array varies in that column from 1 to 5 and more.

 

I want to explode all elements of array dynamically so that i can get one row.

 

I need help to see how i can achieve.

 

Any help is greatly appreciated.

 

Thank you in advance.

Thanks

Highlighted
Cloudera Employee
Posts: 30
Registered: ‎11-20-2015

Re: array?

I am sorry, but I do not understand the requirement.

 

However, perhaps you are looking for the 'explode' UDF:

 

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-explode(array)

New Contributor
Posts: 5
Registered: ‎01-26-2018

Re: array?

I was able to resolve using array_contains.

 

Thanks for your reply.

Announcements