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 命令的更多相关文章

  1. Hive Shell 命令详解

    Hive服务介绍 Hive默认提供的cli(shell)服务,如果需要启动其他服务,那么需要service参数来启动其他服务,比如thrift服务.metastore服务等.可以通过命令hive -- ...

  2. shell命令执行hive脚本(hive交互,hive的shell编程)

    Hive执行方式 Hive的hql命令执行方式有三种: 1.CLI 方式直接执行 2.作为字符串通过shell调用hive –e执行(-S开启静默,去掉"OK","Tim ...

  3. 二、hive shell常用命令

    在使用hive shell之前我们需要先安装hive,并启动hdfs 请参考:https://www.cnblogs.com/lay2017/p/9973298.html hive shell 我们先 ...

  4. 分区表,桶表,外部表,以及hive一些命令行小工具

    hive中的表与hdfs中的文件通过metastore关联起来的.Hive的数据模型:内部表,分区表,外部表,桶表受控表(managed table):包括内部表,分区表,桶表 内部表: 我们删除表的 ...

  5. Hive shell 基本命令

    首先连接 hive shell 直接输入 hive启动, 使用--开头的字符串来表示注释 hive>quit; --退出hive hive> exit; --exit会影响之前的使用,所以 ...

  6. Hadoop概念学习系列之Java调用Shell命令和脚本,致力于hadoop/spark集群(三十六)

    前言 说明的是,本博文,是在以下的博文基础上,立足于它们,致力于我的大数据领域! http://kongcodecenter.iteye.com/blog/1231177 http://blog.cs ...

  7. Hive(四)hive函数与hive shell

    一.hive函数 1.hive内置函数 (1)内容较多,见< Hive 官方文档>            https://cwiki.apache.org/confluence/displ ...

  8. 1.10-1.11 hive交互式命令讲解

    一.hive 交互式命令参数 #帮助 [root@hadoop-senior hive-0.13.1]# bin/hive -h Missing argument for option: h usag ...

  9. Hive 常用命令

    1.hive模糊搜索表 show tables like '*name*'; 2.查看表结构信息  desc formatted table_name;  desc table_name; 3.查看分 ...

随机推荐

  1. HDUOJ---------2255奔小康赚大钱

    奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Sub ...

  2. Block全面分析

    1.第一部分 定义和使用Block, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 - (void)view ...

  3. 快速掌握activity的生命周期

    activity的生命周期不管是在面试还是在工作中我们都会经常遇到,这当然也是非常基础的,基础也很重要哦,学会activity的生命周期对我们以后开发更健壮的程序会有很大帮助.下面来看一下Activi ...

  4. OGG_GoldenGate安装和环境搭建(案例)

    2014-03-02 Created By BaoXinjian

  5. TextBoxes 与 TextBoxes ++

    TextBoxes 论文关键idea 本文和SegLink一样,也是在SSD的基础上进行改进的.相比SSD做了以下的改进: 修改了default box的apect ratio,分别为[1 2 3 5 ...

  6. Googleplay从服务器检索信息时出错。[DF-DFERH-01]

    googleapis.cn services.googleapis.cn 两个地址强制走代理就OK了.

  7. Hadoop自学笔记(五)配置分布式Hadoop环境

    上一课讲了怎样在一台机器上建立Hadoop环境.我们仅仅配置了一个NHName Node, 这个Name Node里面包括了我们全部Hadoop的东西.包括Name Node, Secondary N ...

  8. I2C三态门Verilog

    http://www.blogbus.com/uyarotxb-logs/206932748.html     inout作为输出端口时三态门为选通状态,inout作为输入端口时三态门为高阻态,可通过 ...

  9. iOS改变UINavigationBar导航条标题颜色和字体

    转自:http://www.2cto.com/kf/201311/260409.html iOS 5 以后 UINavigationController 可以 改变UINavigationBar导航条 ...

  10. JNI-获取Java对象的成员变量-GeInttField()

    例: 在Java中定义一个属性,然后用C语言将其设置成另外的值,并输出出来. Java代码: Person.java package com.yuneec.demo; public class Per ...