hive 表分区操作
hive的数据查询一般会扫描整个表,当表数据太大时,就会消耗些时间,有时候我们只需要对部分数据感兴趣,所以hive引入了分区的概念
alert table tableName add
partition(ds='2016-12-16',coutry='beiJing')
location='/opt/hive/beiJing/part2016-12-16'
partition(ds='2016-12-17',coutry='beiJing')
location='/opt/hive/beiJing/part2016-12-17'
alert table tableName drop partitionName,partitionName1,partitionName2
insert overwrite table zhangTest partition(sexual=2) select studentid, sex,address,email from student_3 where sex=0
alert table drop tableName
create view viewName [{col_name},....]
as select....
drop vieww viewName//删除指定的视图
creeate temporary funaction fun_name as classs_name//
drop temporary fun_name//
show tables identifier_with_wildcards
show table extended ..
show function "a"
hive 表分区操作的更多相关文章
- hive表分区操作
1.修复表分区命令 msck repair table table_name; 2.添加表分区操作 alter table table_name add partition(month_id='201 ...
- 如何快速把hdfs数据动态导入到hive表
1. hdfs 文件 {"retCode":1,"retMsg":"Success","data":[{" ...
- HDFS文件和HIVE表的一些操作
1. hadoop fs -ls 可以查看HDFS文件 后面不加目录参数的话,默认当前用户的目录./user/当前用户 $ hadoop fs -ls 16/05/19 10:40:10 WARN ...
- 用puthivestreaming把hdfs里的数据流到hive表
全景图: 1. 创建hive表 CREATE TABLE IF NOT EXISTS newsinfo.test( name STRING ) CLUSTERED BY (name)INTO 3 ...
- spark使用Hive表操作
spark Hive表操作 之前很长一段时间是通过hiveServer操作Hive表的,一旦hiveServer宕掉就无法进行操作. 比如说一个修改表分区的操作 一.使用HiveServer的方式 v ...
- spark+hcatalog操作hive表及其数据
package iie.hadoop.hcatalog.spark; import iie.udps.common.hcatalog.SerHCatInputFormat; import iie.ud ...
- 【原】创建Hive表,分号分隔符“;”引起的异常
[障碍再现] 在创建支持Map数据结构的Hive表时,抛出如下异常 hive> create table tab_map(name string,info map<string,strin ...
- Hive表分区
必须在表定义时创建partition a.单分区建表语句:create table day_table (id int, content string) partitioned by (dt stri ...
- sqlserver 2008表分区操作
表分区操作步骤 1.设计表进行分区的方案,水平分区.垂直分区 a.水平切割将减少表的行数,这样可以将历史数据归档,减少表大小,提高访问速度. b.垂直切割将分为主表和从表方式,将主要的列字段存放在主表 ...
随机推荐
- Android BLE 蓝牙编程(二)
大家中秋快乐啊--哈哈,今天继续工程项目吧! 上篇我们已经实现了蓝牙设备的扫描,本篇我们来通过list展示扫描到的设备并 实现点击连接. 先贴出上篇的完整的MainActivity的方法: packa ...
- jquery 将disabled的元素置为enabled的三种方法
转--http://www.jb51.net/article/19342.htm 在jquery中可以通过jqueryObj.attr("disabled","disab ...
- C# 在类中反射
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Wind ...
- 【PHP】月末・月初の出力方法
文章出处 : Qiita - http://qiita.com/shoridevel/items/0a2f4a64e55d84919a1c 今月の月初 echo date("Y-m-01&q ...
- Interface小例子
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cons ...
- spring 事务传播特性 和隔离级别
事务的几种传播特性1. PROPAGATION_REQUIRED: 如果存在一个事务,则支持当前事务.如果没有事务则开启2. PROPAGATION_SUPPORTS: 如果存在一个事务,支持当前事务 ...
- pair correlation ggpair ggmatrix
https://zhuanlan.zhihu.com/p/23400450 首发于 R语言数据分析与可视化 关注专栏 登录 写文章 R 语言矩阵散点图 EasyCharts· 15 天前 散点 ...
- asp.net Literal
常用于动态向页面添加内容 Panel panel = new Panel(); Literal literal = new Literal(); literal.Text = "<br ...
- (转)为什么所有浏览器的userAgent都带Mozilla
转自:http://www.eamonning.com/blog/view/289 以下是全文 最早的时候有一个浏览器叫NCSA Mosaic,把自己标称为NCSA_Mosaic/2.0 (Windo ...
- HTML5视频播放
1.检测浏览器是否支持html5视频播放 <!doctype html> <html> <head> <meta charset="utf-8&qu ...