码迷,mamicode.com
首页 > 其他好文 > 详细

Hive 常用命令

时间:2017-08-11 19:28:58      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:sum   osi   term   form   xtend   apache   sed   textinput   org   

ALTER TABLE ACCOUNTBALANCESEXTENDED ADD PARTITION (dt=20170612) location /cdsh/cdsh_processed/ACCOUNTBALANCESEXTENDED/20170612;
SELECT COUNT(*),SUM(CAST(closing_balance AS DOUBLE)) FROM ACCOUNTBALANCESEXTENDED WHERE dt=20170612;

CREATE EXTERNAL TABLE `MUREX_CNFOPT_REG_SHIBOR`(
`H_REP_DATE` string,
`NB` string,
`H_TRNDTE` string,
`TRN_TYPE` string,
`TP_PFOLIO` string,
`TP_CNTRP` string,
`TP_CNTRPFN` string,
`H_CTRP_TYP` string,
`TP_STRTGY` string,
`H_BS` string,
`H_CP` string,
`TP_NOMINAL` string,
`TP_NOMCUR` string,
`H_OTH_NOM` string,
`H_OTH_CUR` string,
`TP_STRIKE` string,
`MP_SPOT2` string,
`TP_IPAY` string,
`TP_IPAYCUR` string,
`H_DTEEXP` string,
`H_DTEUNDD` string,
`TP_FXBASE` string,
`H_DELTA2` string,
`H_DELTA1` string,
`H_DELTA` string,
`S_GAMMA2` string,
`S_GAMMA1` string,
`H_GAMMA` string,
`S_RHO2` string,
`S_RHO1` string,
`H_RHO` string,
`S_THETA2` string,
`S_THETA1` string,
`H_THETA` string,
`S_VEGA2` string,
`S_VEGA1` string,
`H_VEGA` string)
PARTITIONED BY (
`dt` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY \u0001
STORED AS INPUTFORMAT
org.apache.hadoop.mapred.TextInputFormat
OUTPUTFORMAT
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
LOCATION
/cdsh/cdsh_processed/Murex_Cnfopt_Reg_Shibor;

 

Hive 常用命令

标签:sum   osi   term   form   xtend   apache   sed   textinput   org   

原文地址:http://www.cnblogs.com/xdlaoliu/p/7347551.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!