hive分区表插入一条测试数据
+-------------------------------------------------------+--+
| createtab_stmt |
+-------------------------------------------------------+--+
| CREATE TABLE `tb_cdr`( |
| `begintime` bigint, |
| `usernum` string, |
| `homearea` string, |
| `relatenum` string, |
| `relatehomeac` string, |
| `imsi` string, |
| `imei` string, |
| `curarea` string, |
| `neid` string, |
| `lai` int, |
| `ci` string, |
| `longitude` float, |
| `latitude` float, |
| `billtype` string, |
| `calltype` string, |
| `dtmf` string, |
| `callduration` int, |
| `cause` string, |
| `rlgtime` bigint, |
| `alerttime` bigint, |
| `connecttime` bigint, |
| `disconnecttime` bigint, |
| `sid` string, |
| `idflag` int, |
| `rawrelatenum` string, |
| `redirflag` int, |
| `origcalledno` string, |
| `disconnecttype` int, |
| `newlai` int, |
| `newci` string, |
| `newlongitude` float, |
| `newlatitude` float, |
| `tmsi` string, |
| `spcode` string, |
| `voiceflag` string, |
| `voicekeya` string, |
| `voicekeyb` string, |
| `peersid` string, |
| `guti` string, |
| `userip` string, |
| `cgi` string, |
| `newcgi` string, |
| `mobileip` string, |
| `imsip` string, |
| `recflag` int, |
| `holdflag` int, |
| `hocnt` int, |
| `mediatype` string, |
| `speechver` string, |
| `beartype` string, |
| `relatelai` int, |
| `relateci` int, |
| `relatelongitude` float, |
| `relatelatitude` float, |
| `relatecgi` string, |
| `client` string, |
| `tags` string, |
| `extra_longitude` float, |
| `extra_latitude` float, |
| `extra_newlongitude` float, |
| `extra_newlatitude` float, |
| `extra_relatelongitude` float, |
| `extra_relatelatitude` float, |
| `geohash` string, |
| `newgeohash` string, |
| `relategeohash` string) |
| PARTITIONED BY ( |
| `cp` bigint, |
| `ld` bigint) |
| ROW FORMAT SERDE |
| 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' |
| STORED AS INPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' |
| OUTPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' |
| LOCATION |
| 'hdfs://hacluster/user/hive/warehouse/tb_cdr' |
| TBLPROPERTIES ( |
| 'last_modified_by'='omm', |
| 'last_modified_time'='1504964008', |
| 'orc.compress'='ZLIB', |
| 'transient_lastDdlTime'='1504964008') |
+-------------------------------------------------------+
insert into table tb_cdr partition(cp=1,ld=2) values(
0,
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
0,
'a',
0.0,
0.0,
'a',
'a',
'a',
0,
'a',
0,
0,
0,
0,
'a',
0,
'a',
0,
'a',
0,
0,
'a',
0.0,
0.0,
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
0,
0,
0,
'a',
'a',
'a',
0,
0,
0.0,
0.0,
'a',
'a',
'a',
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
'a',
'a',
'a');
select * from tb_cdr where cp=1 and ld=2 limit 1;
+-------------------+-----------------+------------------+-------------------+----------------------+--------------+--------------+-----------------+--------------+-------------+------------+-------------------+------------------+------------------+------------------+--------------+----------------------+---------------+-----------------+-------------------+---------------------+------------------------+-------------+----------------+----------------------+-------------------+----------------------+------------------------+----------------+---------------+----------------------+---------------------+--------------+----------------+-------------------+-------------------+-------------------+-----------------+--------------+----------------+-------------+----------------+------------------+---------------+-----------------+------------------+---------------+-------------------+-------------------+------------------+-------------------+------------------+-------------------------+------------------------+-------------------+----------------+--------------+-------------------------+------------------------+----------------------------+---------------------------+-------------------------------+------------------------------+-----------------+--------------------+-----------------------+------------+------------+--+
| tb_cdr.begintime | tb_cdr.usernum | tb_cdr.homearea | tb_cdr.relatenum | tb_cdr.relatehomeac | tb_cdr.imsi | tb_cdr.imei | tb_cdr.curarea | tb_cdr.neid | tb_cdr.lai | tb_cdr.ci | tb_cdr.longitude | tb_cdr.latitude | tb_cdr.billtype | tb_cdr.calltype | tb_cdr.dtmf | tb_cdr.callduration | tb_cdr.cause | tb_cdr.rlgtime | tb_cdr.alerttime | tb_cdr.connecttime | tb_cdr.disconnecttime | tb_cdr.sid | tb_cdr.idflag | tb_cdr.rawrelatenum | tb_cdr.redirflag | tb_cdr.origcalledno | tb_cdr.disconnecttype | tb_cdr.newlai | tb_cdr.newci | tb_cdr.newlongitude | tb_cdr.newlatitude | tb_cdr.tmsi | tb_cdr.spcode | tb_cdr.voiceflag | tb_cdr.voicekeya | tb_cdr.voicekeyb | tb_cdr.peersid | tb_cdr.guti | tb_cdr.userip | tb_cdr.cgi | tb_cdr.newcgi | tb_cdr.mobileip | tb_cdr.imsip | tb_cdr.recflag | tb_cdr.holdflag | tb_cdr.hocnt | tb_cdr.mediatype | tb_cdr.speechver | tb_cdr.beartype | tb_cdr.relatelai | tb_cdr.relateci | tb_cdr.relatelongitude | tb_cdr.relatelatitude | tb_cdr.relatecgi | tb_cdr.client | tb_cdr.tags | tb_cdr.extra_longitude | tb_cdr.extra_latitude | tb_cdr.extra_newlongitude | tb_cdr.extra_newlatitude | tb_cdr.extra_relatelongitude | tb_cdr.extra_relatelatitude | tb_cdr.geohash | tb_cdr.newgeohash | tb_cdr.relategeohash | tb_cdr.cp | tb_cdr.ld |
+-------------------+-----------------+------------------+-------------------+----------------------+--------------+--------------+-----------------+--------------+-------------+------------+-------------------+------------------+------------------+------------------+--------------+----------------------+---------------+-----------------+-------------------+---------------------+------------------------+-------------+----------------+----------------------+-------------------+----------------------+------------------------+----------------+---------------+----------------------+---------------------+--------------+----------------+-------------------+-------------------+-------------------+-----------------+--------------+----------------+-------------+----------------+------------------+---------------+-----------------+------------------+---------------+-------------------+-------------------+------------------+-------------------+------------------+-------------------------+------------------------+-------------------+----------------+--------------+-------------------------+------------------------+----------------------------+---------------------------+-------------------------------+------------------------------+-----------------+--------------------+-----------------------+------------+------------+--+
| 0 | a | a | a | a | a | a | a | a | 0 | a | 0.0 | 0.0 | a | a | a | 0 | a | 0 | 0 | 0 | 0 | a | 0 | a | 0 | a | 0 | 0 | a | 0.0 | 0.0 | a | a | a | a | a | a | a | a | a | a | a | a | 0 | 0 | 0 | a | a | a | 0 | 0 | 0.0 | 0.0 | a | a | a | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | a | a | a | 1 | 2 |
+-------------------+-----------------+------------------+-------------------+----------------------+--------------+--------------+-----------------+--------------+-------------+------------+-------------------+------------------+------------------+------------------+--------------+----------------------+---------------+-----------------+-------------------+---------------------+------------------------+-------------+----------------+----------------------+-------------------+----------------------+------------------------+----------------+---------------+----------------------+---------------------+--------------+----------------+-------------------+-------------------+-------------------+-----------------+--------------+----------------+-------------+----------------+------------------+---------------+-----------------+------------------+---------------+-------------------+-------------------+------------------+-------------------+------------------+-------------------------+------------------------+-------------------+----------------+--------------+-------------------------+------------------------+----------------------------+---------------------------+-------------------------------+------------------------------+-----------------+--------------------+-----------------------+------------+------------+--+
hive分区表插入一条测试数据的更多相关文章
- mysql中迅速插入百万条测试数据的方法
对比一下,首先是用 mysql 的存储过程弄的: 复制代码代码如下: mysql>delimiter $ mysql>SET AUTOCOMMIT = 0$$ mysql> crea ...
- Oracle中插入千万条测试数据
测试需求,id.姓名.邮箱.手机号不可重复 1.创建序列 create sequence id_sequence; //创建序列id_sequence 2.创建表 create table USERI ...
- 利用MySQL存储过程批量插入100W条测试数据
DROP PROCEDURE IF EXISTS insert_batch; CREATE PROCEDURE insert_batch() BEGIN ; loopname:LOOP '); ; T ...
- Hadoop: the definitive guide 第三版 拾遗 第十二章 之Hive分区表、桶
Hive分区表 在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念.分区表指的是在创建表时指 ...
- Hive分区表的导入与导出
最近在做一个小任务,将一个CDH平台中Hive的部分数据同步到另一个平台中.毕竟我也刚开始工作,在正式开始做之前,首先进行了一段时间的练习,下面的内容就是练习时写的文档中的内容.如果哪里有错误或者疏漏 ...
- 记录一次mysql导入千万条测试数据过慢的问题!
数据库在没有做任何优化的情况下,使用存储过程,插入1千万条测试数据. CREATE PROCEDURE addmaxdata(IN n int) BEGIN DECLARE i INT DEFAULT ...
- MySQL快速生成100W条测试数据
https://blog.csdn.net/qq_16946803/article/details/81870174 1.生成思路利用mysql内存表插入速度快的特点,先利用函数和存储过程在内存表中生 ...
- java之5分钟插入千万条数据
虽说不一定5分钟就插入完毕,因为取决去所插入的字段,如果字段过多会稍微慢点,但不至于太慢.10分钟内基本能看到结果. 之前我尝试用多线程来实现数据插入(百万条数据),半个多小时才二十多万条数据. 线程 ...
- Oracle-创建新表,创建备份表,对表中插入多条数据
一.创建新表 0.基本语法 create table 表名称(id varchar2(50) primary key ,name char(200) not null,phone number(11) ...
随机推荐
- springcloud(十二)-springcloud-config统一管理微服务配置
1.为什么要统一管理微服务配置 对于传统的单体应用,常使用配置文件管理所有配置.例如一个SpringBoot开发的单体应用,可将配置内容放在application.yml文件中.如果需要切换环境,可设 ...
- 使用vue-echarts,需要按需引入
引入缺失报错: Error in callback for watcher "options": "Error: Component series.bar not exi ...
- Base64加密后有换行回车的解决办法
据RFC 822规定,每76个字符,还需要加上一个回车换行 有时就因为这些换行弄得出了问题,解决办法如下,替换所有换行和回车 String bTemp = Base64.encodeBase64Str ...
- mac 下的操作
nodejs在Mac下的卸载 在 node 官网上下载的安装包,用安装包安装的node.应该可以用一下命令行卸载: 在终端输入以下命令: sudo rm -rf /usr/local/{bin/{no ...
- ubuntu16.04环境LNMP实现PHP5.6和PHP7.2
最近因为公司突然间说要升级php7,所以做个记录 PPA 方式安装 php7.2 : sudo apt-get install software-properties-common 添加 php7 的 ...
- 第一章·MySQL介绍及安装
一.DBA工作内容及课程体系 二.MySQL课程体系介绍 三.DBA的职业素养 四.MySQL简介及安装 4.1 什么是数据? 数据(data)是事实或观察的结果,是对客观事物的逻辑归纳,是用于表示客 ...
- deep_learning_初学neural network
神经网络——最易懂最清晰的一篇文章 神经网络是一门重要的机器学习技术.它是目前最为火热的研究方向--深度学习的基础.学习神经网络不仅可以让你掌握一门强大的机器学习方法,同时也可以更好地帮助你理解深度学 ...
- jsp页面获取浏览器中的请求 或者 转发过来的请求值
jsp页面中的$(param.xxx) $(param.user)相当于<%=request.getParameter("user")%>
- da面板修改SSH端口号
进入da面板,找到管理工具菜单下的文件编辑器,点击进入,选择所要编辑的文件/etc/ssh/sshd_config 点击右侧的显示文件,即可打开该文件进行编辑,例如可以将原始端口22修改为 33 #P ...
- zencart批量插入TEXT文本属性attributes
有时候上传的产品与多级分类比较多,在后台添加文本属性如Name,Number等需要顾客自定义的内容就比较费神了.现在只需将以下代码保存为insert_attributes.php,变量$options ...