Created
June 27, 2011 21:42
-
-
Save dataminelab/1049918 to your computer and use it in GitHub Desktop.
Unique visitors HiveQL
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
ADD JAR ${CODE}/hive/udf/md5.jar; | |
CREATE TEMPORARY FUNCTION mymd5 AS 'com.dataminelab.hive.udf.Md5'; | |
SELECT | |
DISTINCT mymd5(user_id) | |
FROM page_views | |
WHERE | |
substr(mymd5(user_id), -2) == '00'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment