Hive beeline update
Hive cli vs beeline
The primary difference between the two involves how the clients connect to Hive.
The Hive CLI connects directly to the Hive Driver and requires that Hive be installed on the same machine as the client.
Beeline connects to HiveServer2 and does not require the installation of Hive libraries on the same machine as the client. Beeline is a thin client that also uses the Hive JDBC driver but instead executes queries through HiveServer2, which allows multiple concurrent client connections and supports authentication.
1.load data local inpath is not support in beeline.
Solution: a. we can use 'put' and 'load data inpath' to replace this command.
b. create these stage table as external table, then we just add new partitions and then just put file, not need load.
beeline -n username -u "jdbc:hive2://hiveserver:10000/dbname;principal=hive/hiveserve@domain"
run kinit before run beeline.
Echo 'password' | kinit
drop table evan_test2;
CREATE EXTERNAL TABLE evan_test2 (
userId BIGINT,
type INT,
filename String
)
COMMENT 'User Infomation'
PARTITIONED BY (country String)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION 'hdfs:////evan_test/';
alter table evan_test2 add partition(country='tet');
2.
INSERT OVERWRITE LOCAL DIRECTORY 'temp'
FIELDS TERMINATED BY ','
select * from evan_test2;
This is not support in beeline .
Solution: we can use beeline's new command to implement the same function.
beeline --showHeader=false --outputformat=dsv --delimiterForDSV=$'\001' -e 'select * from evan_test3' >test.csv
Show data test.csv
Cat -a test.csv
Cat -a test.csv | tr $'\001' '\t'
Hive beeline update的更多相关文章
- Hive Beeline 官方文档学习
Beeline 是什么? 它是一个命令行形式的jdbc客户端.搞Java开发的同学,看到这里就应该知道这货是什么了 ── 它是一个连接数据库的工具. 只不过Beeline连接的数据库是HiveServ ...
- hive beeline详解
Hive客户端工具后续将使用Beeline 替代HiveCLI ,并且后续版本也会废弃掉HiveCLI 客户端工具,Beeline是 Hive 0.11版本引入的新命令行客户端工具,它是基于SQLLi ...
- Hive Beeline 命令行参数
[hadoop@hive ~]$ beeline --help[中文版] The Beeline CLI 支持以下命令行参数: Option Description --autoCommit=[tru ...
- [转]Hive/Beeline 使用笔记
FROM : http://www.7mdm.com/1407.html Hive: 利用squirrel-sql 连接hive add driver -> name&example u ...
- 关于 HIVE Beeline 问题
1 启动 hiveserver2 服务,启动 beeline -u jdbc:hive2:// 正常 ,启动 beeline -u jdbc:hive2://127.0.0.1:10000 包如下错 ...
- hive Beeline plus HiveServer2简单使用
HiveServer2是经常与beeline一起使用,可以用jdbc客户端远程连接,一般用于生产环境. 在提供传统客服端的功能之外,还提供其他功能: Beeline连接 1.先在hadoop集群启动H ...
- HIve:beeline终端上在输错hive语句时,无论 Backspace还是delete 都删除不掉错误的语句,没有办法退格
通过SecureCRT工具连上linux后,通过beeline连接上hive后,在输错hive语句时,无论 Backspace还是delete 都删除不掉错误的语句,没有办法退格. 解决方案: 第一步 ...
- hive orc update
hive-site.xml --><configuration> <!-- WARNING!!! This file is auto generated for documen ...
- hive & hive beeline常用参数
Hive 1参数如下: usage: hive -d,--define <key=value> Variable substitution to apply to Hive command ...
随机推荐
- asp.net mvc UpdateModel 更新对象后出现null
在用asp.net mvc 4.0做项目的时候遇到的这种情况 在填写表单的时候,有一些表单没有填写,留空,然后直接post 提交表单,action中用UpdateModel 来更新model, 结果发 ...
- php中的字符串常用函数(四) ord() 获得字符的ascii码 chr()获取ascii码对应的字符
ord('a');//=>97 返回小写a 的ascii码值97 chr(97);//=>a 返回ascii码表上的97对应的 小写a
- (旧)子数涵数·C语言——让C帮你做计算
之前,我们学过了我们的第一个C程序--hello World.现在开始进一步学习,想一想如何让C帮你做计算. 我们先来看代码(我没有新建,还是用之前的hello world.cpp): 好,因为之前在 ...
- linux系统如何将系统中的文件名改为英文?
由于我们经常在命令行模式下进入文件,那么中英文的切换常常会影响我们输入的效率. 那么如何将原来的中文修改成英文的字幕呢? 如下图所示: -------------------------------- ...
- Android应用开发基础之六:页面跳转和数据传递
创建第二个Activity 需要在清单文件中为其配置一个activity标签 标签中如果带有这个子节点,则会在系统中多创建一个快捷图标 <intent-filter> <action ...
- 说反话(c++实现)
描述:给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出. 输入:测试输入包含一个测试用例,在一行内给出总长度不超过80的字符串.字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有 ...
- Vue自带的过滤器
gitHub地址:https://github.com/lily1010/vue_learn/tree/master/lesson05 一 过滤器写法 {{ message | Filter}} 二 ...
- Angularjs中对时间格式:/Date(1448864369815)/ 的处理
注:本文使用的 angular 版本为 1.3 版 我们在后台对数据进行json序列化时,如果数据中包含有日期,序列化后返回到前端的结果可能是这样的: /Date(1448864369815)/ . ...
- jQuery 的 ajax
jQuery load() 方法 jQuery load() 方法是简单但强大的 AJAX 方法. load() 方法从服务器加载数据,并把返回的数据放入被选元素中. $(selector).load ...
- COMMIT WORK AND WAIT 是在WAIT什么
wait 还是不wait,这是个问题. 这是同步更新还是异步更新的问题:如果是只commit work,是异步更新,触发注册在当前SAP LUW中所有数据更新动作,数据更新动作由SAP的更 ...