HIVE 命令记录 设置hive运行的队列 hive> set mapreduce.job.queuename=ven12; 打印列名 hive> set hive.cli.print.header=true; 创建新表 hive> CREATE TABLE t_hive (a int, b int, c int) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; 正则匹配表名 hive>show tables '*t*'; 增加一个字
启动hive命令时指定参数或自定义参数 在hive启动命令中指定一个参数 hive --hiveconf hive.job.submit.username=fuxin.zhao -e "select dt,count(1) from ods.s1_userinfo where dt>='2017-02-01' group by dt;" 在hive启动命令中指定多个参数,这些参数是hive-site.xml中参数,也开始自定义的惨. hive --hiveconf hive.jo
在hive命令行中查询数据如下: 表头未显示出来 解决办法: 修改hive安装包conf/hive-site.xml配置文件: <property> <name>hive.cli.print.header</name> <value>true</value> <description>Whether to print the names of the columns in query output.</description&g