1 show databases;
2 desc t_partition001;
3 desc extended t_partition002;
4 desc formatted t_partition002;
5 !clear;
6 !ls;
7 dfs -ls /;

2 DML操作

load

load data local inpath '/root/hivedata/t_partitioned' into table t_partition001 partition(country="Japan");

load data inpath '/t_partitioned' into table t_partition001 partition(country="Japan");

overwrite

load data local inpath '/root/hivedata/stu_partition2' overwrite into table stu_partition partition(city="China");

like

create table t_1 like stu_partition;

insert

insert overwrite table t_1 partition(city='Japan') select id,name,age from stu_partition;

-- 导出数据insert overwrite local directory '/root/hivedata/data' select * from student;
insert overwrite directory '/root/hivedata/data' select * from student;

3 multi insert 多重插入

4 Dynamic partition inserts  动态分区插入

5 自动分区模式

set hive.exec.dynamic.partition.mode=nonstrict;

大数据学习——hive显示命令的更多相关文章

  1. 大数据学习——hive基本操作

    1 建表 create table student(id int,name string ,age int) row format delimitedfields terminated by ','; ...

  2. 大数据学习——linux常用命令(四)

    四 查到命令 1 查找可执行的命令所在的路径 which ls 查ls命令所在的路径 2 查找可执行的命令和帮助的位置 whereiis ls 3 从某个文件夹开始查找文件 find / -name ...

  3. 大数据学习——hive数据类型

    1. hive的数据类型Hive的内置数据类型可以分为两大类:(1).基础数据类型:(2).复杂数据类型2. hive基本数据类型基础数据类型包括:TINYINT,SMALLINT,INT,BIGIN ...

  4. 大数据学习——hive安装部署

    1上传压缩包 2 解压 tar -zxvf apache-hive-1.2.1-bin.tar.gz -C apps 3 重命名 mv apache-hive-1.2.1-bin hive 4 设置环 ...

  5. 大数据学习——linux常用命令(三)

    三 文件操作 1创建文件 touch somefile.txt 创建一个空文件somefile.txt > 重定向操作符 echo "woshiwoa"> some.t ...

  6. 大数据学习——hive函数

    1 内置函数 测试各种内置函数的快捷方法: 1.创建一个dual表 create table dual(id string); 2.load一个文件(一行,一个空格)到dual表 3.select s ...

  7. 大数据学习——hive的sql练习

    1新建一个数据库 create database db3; 2创建一个外部表 --外部表建表语句示例: create external table student_ext(Sno int,Sname ...

  8. 大数据学习——hive使用

    Hive交互shell bin/hive Hive JDBC服务 hive也可以启动为一个服务器,来对外提供 启动方式,(假如是在itcast01上): 启动为前台:bin/hiveserver2 启 ...

  9. 大数据学习——hive的sql练习题

    ABC三个hive表 每个表中都只有一列int类型且列名相同,求三个表中互不重复的数 create table a(age int) row format delimited fields termi ...

随机推荐

  1. Educational Codeforces Round 46 (Rated for Div. 2) A. Codehorses T-shirts

    Bryce1010模板 http://codeforces.com/problemset/problem/1000/A 题意: 问你将一种类型的衣服转换成另一种的最小次数. #include<b ...

  2. Histogram LightOJ - 1083

    Histogram LightOJ - 1083 题意:给出一个直方图,由n个长条组成,它们的x轴上坐标分别为1-n,读入n之后读入的一行中,第i个表示x轴上坐标为i的长条长度.求直方图最大的正方形面 ...

  3. 模拟 百度之星资格赛 1003 IP聚合

    题目传送门 /* 模拟水题,排序后找出重复的ip就可以了 */ #include <cstdio> #include <iostream> #include <algor ...

  4. c#学习系列之关键字where

    where 子句用于指定类型约束,这些约束可以作为泛型声明中定义的类型参数的变量.    1.接口约束.         例如,可以声明一个泛型类 MyGenericClass,这样,类型参数 T 就 ...

  5. 前端之HTML语法及常用标签

    html语法: 1.常规标记: <标记 属性=“属性值” 属性=“属性值”></标记>: 2.空标记: <标记 属性=“属性值” 属性=“属性值”/> 注意事项: ...

  6. 用私有构造器或者枚举类型强化Singleton

    参考Effective Java第三版 Joshua J. Bloch 参与编写JDK的大佬,上次看Collections的源码时看见了他的名字,然后翻了翻书,竟然就是他写的! 1.常见的一种: pu ...

  7. 微信小程序 插件介绍

    小程序的插件是对一组js接口.自定义组件或页面的封装.插件不能独立运行,必须嵌入在其他小程序中才能被用户使用:而第三方小程序在使用插件时,也无法看到插件的代码.因此,插件适合用来封装自己的功能或服务, ...

  8. git push时报错filename too long的解决

    命令行输入:git config core.longpaths true 之后再进行 git 的push命令

  9. Eric's并发用户数估算与Little定律的等价性

    在国内性能测试的领域有一篇几乎被奉为大牛之作的经典文章,一个名叫Eric Man Wong 于2004年发表了名为<Method for Estimating the Number of Con ...

  10. 【HEVC帧间预测论文】P1.4 Motion Vectors Merging: Low Complexity Prediction Unit Decision

    Motion Vectors Merging: Low Complexity Prediction Unit Decision Heuristic for the inter-Prediction o ...