You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2009/05/19 10:15:21 UTC
[Hadoop Wiki] Update of "Hive/UserGuide" by Manhee Jo
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 Manhee Jo:
http://wiki.apache.org/hadoop/Hive/UserGuide
------------------------------------------------------------------------------
userid INT,
movieid INT,
rating INT,
- unixtime TIMESTAMP)
+ unixtime STRING)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE;
@@ -80, +80 @@
line = line.strip()
userid, movieid, rating, unixtime = line.split('\t')
weekday = datetime.datetime.fromtimestamp(float(unixtime)).isoweekday()
- print ','.join([userid, movieid, rating, str(weekday)])
+ print '\t'.join([userid, movieid, rating, str(weekday)])
}}}
Use the mapper script: