Word count using Hive
Hello | |
World | |
Bye | |
World |
CREATE TABLE words(word STRING); | |
LOAD DATA LOCAL INPATH 'C:\Temp\wordcount\InputData.txt' OVERWRITE INTO TABLE words; | |
SELECT word, count(*) FROM words GROUP BY word; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Hi, The WordCount is working fine, but its consider whole line as a Word, if i want to count the words in each line then what is the HQL query???