I am evaluating Hive and have to do some concatenation of the row field after the group. I found a function called "concat_ws", but it looks like I should explicitly list all the values ββthat will be concatenated. I am wondering if I can do something like this with concat_ws in Hive. Here is an example. So I have a table called "my_table" and it has two fields named country and city. I want to have only one entry for each country, and each entry will have two fields - country and cities:
select country, concat_ws(city, "|") as cities from my_table group by country
Is this possible in the hive? I am using Hive 0.11 from CDH5 right now
source share