I have a hive SQL as below which returns the following output, now I want to get the first not null value from array i.e. "11".
SQ::
select cod_cust, split(reverse(concat_ws('',collect_list(case when acc_status='Dormant' then "1" else "0" end))),'0') status from account_status group by cod_cust;
Output::
cod_cust status
1023 ["","11","1","111","",""]
2209 ["","11","1","111","",""]