Created
May 19, 2018 17:07
-
-
Save Sundar1906/1683849144eb1189f8e8c56ca65bfd05 to your computer and use it in GitHub Desktop.
WordCount in Hive Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE Wcount(words STRING); | |
LOAD DATA LOCAL INPATH '/home/skumares/InputData.txt' OVERWRITE INTO TABLE Wcount; | |
Select wc,count(*) from(Select explode(split(words,' ')) from Wcount) p group by wc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello Hive Users | |
Hello Boss | |
let us create the Word Count Input file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment