Data Warehouse Hive

How to get array_position in Hive

  • 1.  How to get array_position in Hive

    Posted 15 days ago
    Hello,

    I need to implement a datameer function in Hive. It tries to get the index of the array based on the search string and then fetch that index from other array element.

    Datameer function:

    LISTELEMENT(Array_1;IF(INDEXOF(Array_2;''Search string')))

    How can I implement this in Hive? I tried to use POSEXPLODE on Array_2 but its not giving me the expected output.

    Can someone please help?
    Thanks!

    ------------------------------
    Trupti Bhutada
    ------------------------------