To fetch an element of an Array you can just specify the position of the element in your query.
Say if you have a table like
'test_table' with a field 'arr_clmn Array<STRING>', you can get the first element of the array as
SELECT arr_clmn FROM test_table;
Or if you are looking at exploding the row itself to multiple rows you can do so with
SELECT * FROM test_table LATERAL VIEW explode(arr_clmn) exp_arr AS arr_elmnt;
Sent from handheld, please excuse typos.
From: Techy Teck <[EMAIL PROTECTED]>
Date: Fri, 10 Aug 2012 20:22:26
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Exploding Array of String in Hive
Basically How can I get each String outside, something like
should return *"VAN%2C%20Under%20Â£1%2C000%2E00%20Ending%20within%202%20days",
On Fri, Aug 10, 2012 at 8:04 PM, Techy Teck <[EMAIL PROTECTED]> wrote:
> Below is the data in *favorite_result (datatype: array<string>) *column.
> Its an array of String in hive-
> How I can explode this above string in hive?