1. 程式人生 > >將hive資料查詢直接寫入檔案

將hive資料查詢直接寫入檔案

hive -e "select dateentry,count(distinct(uid)) from log where (channel!='淘寶平臺')  and appid=1 and code = 'ABP044' and  dateentry> '2015-02-02' and dateentry<'2015-02-08' 

group by dateentry" > ABP044.txt ;