Support Questions

Find answers, ask questions, and share your expertise

Query array value by index/posistion

avatar
Contributor

Is it possible to get array data by position? If B is an array under A, can i do something like

 

select B[0].value, B[1].value

from A

 

 

Thanks

Shannon

1 REPLY 1

avatar

Hi Shannon,

 

Impala does not yet support array or map subscripts. What you can do is something like this:

 

select a.value from mytable t, t.myarray a where a.pos in (0,1)

 

But this will give you the "values" elements as rows and not in different columns.