vgrabovets
11/7/2016 - 3:18 PM

save output

save output

set mapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec;
set hive.exec.compress.output=true;

insert overwrite local directory 'output'
row format delimited fields terminated by ','
SELECT                 
user_id, 
object_id, 
sum(duration) duration  
FROM atos              
where vodtype_id = 2     
group by user_id, object_id;