Hive shell 命令
Hive shell 命令。
连接 hive shell
直接输入 hive
1、显示表
hive> show tables;
OK
test
Time taken: 0.17 seconds, Fetched: 1 row(s)
2、创建表
hive> create table test(key string);
OK
Time taken: 0.265 seconds
3、创建分区表:
hive> create table logs(ts bigint,line string) partitioned by (dt String,country String);
4、加载分区表数据:
hive> load data local inpath '/home/Hadoop/input/file1' into table logs partition (dt='2014-03-11',country='CN');
5、展示表中有多少分区:
hive> show partitions logs;
Hive shell 命令的更多相关文章
- Hive Shell 命令详解
Hive服务介绍 Hive默认提供的cli(shell)服务,如果需要启动其他服务,那么需要service参数来启动其他服务,比如thrift服务.metastore服务等.可以通过命令hive -- ...
- shell命令执行hive脚本(hive交互,hive的shell编程)
Hive执行方式 Hive的hql命令执行方式有三种: 1.CLI 方式直接执行 2.作为字符串通过shell调用hive –e执行(-S开启静默,去掉"OK","Tim ...
- 二、hive shell常用命令
在使用hive shell之前我们需要先安装hive,并启动hdfs 请参考:https://www.cnblogs.com/lay2017/p/9973298.html hive shell 我们先 ...
- 分区表,桶表,外部表,以及hive一些命令行小工具
hive中的表与hdfs中的文件通过metastore关联起来的.Hive的数据模型:内部表,分区表,外部表,桶表受控表(managed table):包括内部表,分区表,桶表 内部表: 我们删除表的 ...
- Hive shell 基本命令
首先连接 hive shell 直接输入 hive启动, 使用--开头的字符串来表示注释 hive>quit; --退出hive hive> exit; --exit会影响之前的使用,所以 ...
- Hadoop概念学习系列之Java调用Shell命令和脚本,致力于hadoop/spark集群(三十六)
前言 说明的是,本博文,是在以下的博文基础上,立足于它们,致力于我的大数据领域! http://kongcodecenter.iteye.com/blog/1231177 http://blog.cs ...
- Hive(四)hive函数与hive shell
一.hive函数 1.hive内置函数 (1)内容较多,见< Hive 官方文档> https://cwiki.apache.org/confluence/displ ...
- 1.10-1.11 hive交互式命令讲解
一.hive 交互式命令参数 #帮助 [root@hadoop-senior hive-0.13.1]# bin/hive -h Missing argument for option: h usag ...
- Hive 常用命令
1.hive模糊搜索表 show tables like '*name*'; 2.查看表结构信息 desc formatted table_name; desc table_name; 3.查看分 ...
随机推荐
- 【jquery】hover方法
方法名称:hover(over, out) 概述:当鼠标移动到一个匹配的元素上面时,会触发指定的第一个函数.当鼠标移出这个元素时,会触发指定的第二个函数. 参数: 1) overFunction 鼠标 ...
- C#中遍历DataTable类型并删除行数据
从数据库中读取出了DataSet类型的数据,通过dataSet.Tables[0]获得DataTable类型的数据. 这时候如果想批量修改dataTable中的内容,比如要删除dataTable中co ...
- Eclipse编译快捷键
从C#转学Java,总结了一些Eclipse跟Microsoft Visual Studio 向对应的快捷键: 1. Run Ctrl+F11 (VS对应的是F5) 2. Debug F11 ( ...
- unity5 Text
unity5中,添加Text对象: 在其它对象的脚本中如果想引用此Text,则应定义: public UnityEngine.UI.Text myText; 然后把对象拖到变量上即可. 注: 1,需要 ...
- Android开发11——手机横屏和竖屏与android:configChanges
目前大多数手机都支持重力感应随之而来的就是屏幕方向改变的问题.对应普通开发者来说屏幕的随意改变也会带来困扰.在Google自带的doc里可以看到,如果设备的配置(Resources.Configura ...
- ps换衣服
1.抠衣服->给衣服新建图层(ctrl+j)->给图层去色,让衣服边黑白色.2.剪贴蒙版(上图:大花布,下形:衣服).作用:大花布替换成衣服3.大花布图层->叠加图层样式或其它图层样 ...
- vim:查看当前的配置文件名称和地址
vim把当前使用的配置文件地址放置在变量MYVIMRC中.在vim使用echo查看即可: :echo $MYVIMRC
- iptables的地址取反操作
感叹号要写在-d的前面才行,而且要用空格隔开. iptables -A OUTPUT -o eth0 -p tcp ! -d xxx.xxx.xxx.xxx -j DROP
- ssh 远程执行命令 -t
# ssh -p22022 -t 122.16.67.116 ls -l /root/.ssh total -rw-r--r-- root root Jan : authorized_keys -rw ...
- C# RSA数据加密
第一步产生密钥类 CreateKey using System; using System.Collections.Generic; using System.Linq; using System.T ...