第16天: 增加分区、删除分析、加载数据到指定分区讲解和案例操作
来源:互联网 发布:索非亚实木颗粒板 知乎 编辑:程序博客网 时间:2024/06/05 02:36
Hive学习实战
--------------------------------------------------------------
Hive从入门到实战【40讲】---笔记记录
--------------------------------------------------------------
hive命令
1、show tables;
2、show databases;
3、 desc login; ---查看表结构。
4、 show partitions test5; --查看分区
第16天: 增加分区、删除分析、加载数据到指定分区讲解和案例操作---
添加分区
alter table table_name
add partiton( partCol='value1' ) location 'loc1';
删除分区
alter table login drop if exists partition (dt='2008-08-08');
alert table page_view drop if exists partition(dt=2008-08-08
',country='us');
添加列
alter table table_name add columns (
col_name string); //在所有存在的列后面,但是
在分区列之前添加一列。
create table test5(
uid string,
ip string
)
partitioned by (dt string,hour string)
row format delimited
fields terminated by ','
stored as textfile;
alter table test5
add partition (dt='2015-02-08',hour='08')
location '/hive/test5/dt=2015-02-08/hour=09'
partition (dt='2015-02-08',hour='09')
location '/hive/test5/dt=2015-02-08/hour=10'
load data local inpath '/hadoop/hive0.9/testHive/x1.txt' into table test5
partition(dt='2015-02-08',hour='09')
--------------------------------------------------------------
Hive从入门到实战【40讲】---笔记记录
--------------------------------------------------------------
hive命令
1、show tables;
2、show databases;
3、 desc login; ---查看表结构。
4、 show partitions test5; --查看分区
第16天: 增加分区、删除分析、加载数据到指定分区讲解和案例操作---
添加分区
alter table table_name
add partiton( partCol='value1' ) location 'loc1';
删除分区
alter table login drop if exists partition (dt='2008-08-08');
alert table page_view drop if exists partition(dt=2008-08-08
',country='us');
添加列
alter table table_name add columns (
col_name string); //在所有存在的列后面,但是
在分区列之前添加一列。
create table test5(
uid string,
ip string
)
partitioned by (dt string,hour string)
row format delimited
fields terminated by ','
stored as textfile;
alter table test5
add partition (dt='2015-02-08',hour='08')
location '/hive/test5/dt=2015-02-08/hour=09'
partition (dt='2015-02-08',hour='09')
location '/hive/test5/dt=2015-02-08/hour=10'
load data local inpath '/hadoop/hive0.9/testHive/x1.txt' into table test5
partition(dt='2015-02-08',hour='09')
0 0
- 第16天: 增加分区、删除分析、加载数据到指定分区讲解和案例操作
- 第18天: hive数据加载 从文件加载到hive表讲解和案例操作、从查询插入数据到hive表讲解和案例操作
- 分区表及分区索引(16)--增加和删除索引分区
- db2 增加删除分区
- db2 增加删除分区
- 增加、删除和收缩表分区!
- oracle删除分区、子分区,元数据和和只清除分区、子分区数据sql
- hive 动态加载数据到指定分区,以及其他hive使用的技巧
- oracle交换分区对数据的加载提速案例
- SQL Server通用的分区增加和删除的算法
- linux 如何增加swap分区,和删除,移动swap
- 删除分区表里某个分区的数据
- 管理分区表+为范围分区表增加分区+为散列分区表增加分区+为列表分区表增加分区+查看当前用户的表和表分区信息+合并分区+删除分区
- MySql数据分区操作
- mysql 数据分区操作
- MySQL 查询指定分区数据
- oracle删除分区和添加分区
- 分区表 分区索引 增加 收缩 删除 表分区
- git submodule update failed
- [SGU124] Broken line && 计算几何
- 【分析】浅谈C#中Control的Invoke与BeginInvoke在主副线程中的执行顺序和区别(SamWang)
- Eclipse快捷键
- Codeforces Round #290 (Div. 2)C - Fox And Names——拓扑排序
- 第16天: 增加分区、删除分析、加载数据到指定分区讲解和案例操作
- Codeforces 510C Fox And Names 拓扑排序
- openssl在windows下面编译
- [POJ1755] Triathlon && 计算几何, 线性规划
- 已阅读python书籍清单
- 函数中变量的生存期~~~~~带图片解释!!!!!
- python学习笔记(十三) - easy_install安装与使用
- [POJ1113] Wall && 计算几何
- Summary - 2015.2.5 贪心