hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan LeCompte <lecom...@gmail.com>
Subject Query with comma-delimited value of a column
Date Mon, 19 Oct 2009 20:22:12 GMT
Hello all,

Another Hive query question... :)

If I have a column in a table of type STRING, and it can take on a
comma-delimited set of values (arbitrary, and unknown at query time)... For
example: col1 = 'a','b','c' in one row and another row has
col1='j','k','l'... Is it possible to write a query to get the counts of
each comma-delimited value of col1? For example, something like this:


a  b   c    j   k   l
5 100 34  1  22 54

I guess I would have to know the full set of possible values of col1, no? Or
maybe a user-defined function?

Thanks,
Ryan

Mime
View raw message