首页 > 代码库 > Hive 常用命令
Hive 常用命令
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 常用命令
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。