Someone could use this function before, I tried almost any combination to see if it works.
This is the Struct array that I am trying to use with inline
[{"position":1,"price":124.0,"card_pos":"External","clicked":0},
{"position":2,"price":94.78,"card_pos":"Cbox","clicked":0},
{"position":3,"price":94.77,"card_pos":"External","clicked":0}]
This works well:
select iq.*, iq.card.position as position,
iq.card.price as price,iq.card.card_pos as card_pos,
iq.card.clicked as clicked
from
(
select *
from
hsim.im_metasearch
LATERAL VIEW explode(cards) card as card
) iq
It is annoying that I can make the inline function work. The documentation on the Wive Wiki is very vague about how this function should be used properly.
We have Hive 0.10 (CDH4.6), the inline function is definitely part of our distribution.
If anyone has a specific example of how to use it, please let me know
I tried a couple of different syntaxes
select *
from
hsim.im_metasearch
Lateral view inline(cards) as(position,price,card_pos,clicked)
select *
from
hsim.im_metasearch
Lateral view inline(cards) card as (position,price,card_pos,clicked)
I also tried to include it in the selection without success Thank you