Created
September 23, 2013 21:28
-
-
Save mioalter/6677207 to your computer and use it in GitHub Desktop.
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 IF NOT EXISTS normalized ( | |
gram string, | |
year int, | |
occurrences bigint | |
); | |
INSERT OVERWRITE TABLE normalized | |
SELECT | |
lower(gram), | |
year, | |
occurrences | |
FROM | |
ngrams | |
WHERE | |
year >= (${hiveconf:min_year} - 1) AND | |
year <= ${hiveconf:max_year} AND | |
gram REGEXP "^[A-Za-z+'-]{3,}$"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment