Last active
September 16, 2015 18:29
-
-
Save nuria/c496b41759713982e34a to your computer and use it in GitHub Desktop.
Testing a udf
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 /home/nuria/workplace/refinery/source/refinery-core/target/refinery-core-0.0.19-SNAPSHOT.jar; | |
add jar /home/nuria/workplace/refinery/source/refinery-hive/target/refinery-hive-0.0.19-SNAPSHOT.jar; | |
CREATE TEMPORARY FUNCTION isPageview as 'org.wikimedia.analytics.refinery.hive.IsPageviewUDF'; | |
CREATE TEMPORARY FUNCTION isAppPageview as 'org.wikimedia.analytics.refinery.hive.IsAppPageviewUDF'; | |
use wmf; | |
select isPageview(uri_host, uri_path, uri_query, http_status, content_type, user_agent) from webrequest where year=2015 and month=09 and day=04 and hour=01; | |
--call hive like this leaving the hive.aux.jars.path | |
>hive --hiveconf hive.aux.jars.path= -f test-udf.hql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment