1

I have a hive array of string and I want to convert it to string. Hive version is 1.2.1000.2.6.1.0-129.

create table a (arr array<string>);

create table b (str array<string>);

insert into table b
select * from a;

I tried:

concat_ws(',',collect_set(cast(arr as string))

collect_set(cast(arr as string))

cast(arr as string)
2
  • Thanks but not working for me Commented Oct 1, 2020 at 14:05
  • What specifically goes wrong? Commented Oct 2, 2020 at 6:35

1 Answer 1

0

concat_ws() function (concatenate with separator) concatenates array elements into string separated with specified separator (comma in this example):

concat_ws(',',arr) as result
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.