djohon
djohon

Reputation: 889

how to read a complex type array<string> on impala or hive?

I try to read a complex type on hive

dog.owners (array<string>)

with the following query

select dog_id, concat_ws(',',collect_set(owners)) as owners 
from dog 
group by dog_id

but i receive the following error

Argument 2 of function CONCAT_WS must be "string or array<string>", but "array<array<string>>" was found.

Looks like there is a data type mismatch. I tried to create the column owners as an array<array<string>> but i still get the same error. Is there a way to read that column on hive or impala?

Upvotes: 1

Views: 3487

Answers (1)

Vijay Krishna
Vijay Krishna

Reputation: 1067

select dog_id, do.* from dog, dog.owners as do

Upvotes: 1

Related Questions