hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Trivial Update of "Hive/HiveQL/Transform" by ZhengShao
Date Thu, 22 Jan 2009 00:10:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by ZhengShao:
http://wiki.apache.org/hadoop/Hive/HiveQL/Transform

------------------------------------------------------------------------------
  
  Instead of specifying "cluster by", the user can specify "distribute by" and "sort by",
so the partition columns and sort columns can be different. The usual case is that the partition
columns are a prefix of sort columns, but that is not required.
  
+ {{{
- : FROM (
+   FROM (
- ::  FROM pv_users
+     FROM pv_users
- ::  MAP pv_users.userid, pv_users.date
+     MAP pv_users.userid, pv_users.date
- ::  USING 'map_script'
+     USING 'map_script'
- ::  AS c1, c2, c3
+     AS c1, c2, c3
- ::  DISTRIBUTE BY c2
+     DISTRIBUTE BY c2
- ::  SORT BY c2, c1) map_output
+     SORT BY c2, c1) map_output
- : INSERT OVERWRITE TABLE pv_users_reduced
+   INSERT OVERWRITE TABLE pv_users_reduced
- ::  REDUCE map_output.c1, map_output.c2, map_output.c3
+     REDUCE map_output.c1, map_output.c2, map_output.c3
- ::  USING 'reduce_script'
+     USING 'reduce_script'
- ::  AS date, count;
+     AS date, count;
+ }}}
  

Mime
View raw message