Skip to content
Advertisement

Hive – Split and count values by delimiter – lateral view explode

I have a following Hive table

I need to split and get the count values of each item in item_val column

Expected output

I tired below count but values are not getting delimited properly.

Please help!

Advertisement

Answer

In Hive, one option is to use the lateral view syntax:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement