使用sqoop --options-file 导入hive数据
来源:互联网 发布:画树状图软件 编辑:程序博客网 时间:2024/05/19 20:20
[Author]: kwu
使用sqoop --options-file直接导入hive数据,把操作命令语句写在文件中,便于管理及管理
1、创建hive数据库及表
create database DB_TEST;
CREATE TABLE
UserRegLoginLog(
ID BIGINT,
fld_date TIMESTAMP,
fld_ip string,
fld_server_ip string,
fld_UA string,
UserId BIGINT ,
UserName string,
PassWord string,
ActionType INT ,
ActionTime TIMESTAMP ,
ActionIP string,
FromHost string,
UrlRefer string,
RemotePort string
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' ;
2、编写sqoop操作文件,注意做分隔符需要与hive的一致
vi UserRegLoginLog_hive.opt
import --connect jdbc:jtds:sqlserver://localhost:1433;;DatabaseName=DB_TEST --username sa --password 123456--table UserRegLoginLog--where1=1--columns" ID ,fld_date ,fld_ip ,fld_server_ip ,fld_UA ,UserId ,UserName ,PassWord ,ActionType ,ActionTime ,ActionIP ,FromHost ,UrlRefer,RemotePort "--fields-terminated-by '\t'--hive-import--hive-overwrite--hive-drop-import-delims--hive-tableDB_TELECAST.UserRegLoginLog
使用sqoop --options-file 执行操作文本
sqoop --options-file ./UserRegLoginLog_hive.opt
3、指定hive的数据库,格式为: 数据库.表名
DB_TEST.UserRegLoginLog
3 0
- 使用sqoop --options-file 导入hive数据
- 使用sqoop --options-file 导入hive数据
- sqoop导入数据到hive
- sqoop导入数据到hive
- Sqoop导入数据到Hive
- sqoop导入数据至hive
- Hive数据导入、sqoop数据导入导出
- 使用sqoop将mysql中数据导入到hive中
- Sqoop工具使用(一)--从oracle导入数据到hive
- 使用Sqoop将Hive表数据导入到mysql
- 使用sqoop将hive数据导入mysql实例
- 使用Sqoop从MySQL导入数据到Hive和HBase
- 5.sqoop --options-file
- 用sqoop导入数据到hive中
- sqoop hive mysql oracle 数据导入
- sqoop向hdfs,hive,hbase导入数据
- sqoop 导入mysql数据到hive
- sqoop导入mysql数据到hive中报错
- DHCPSnooping原理
- a标签设置点击颜色,点击另外一后颜色转移至当前点击a标签
- LeetCode (30) Palindrome Number (回文数字)
- 28个java常用工具类
- 微微财经视频喊单直播系统最新功能介绍 微微财经李经理:13156185875
- 使用sqoop --options-file 导入hive数据
- SPM-AUTO
- CAS单点登录教程
- 如何查看linux系统(硬件)信息
- Maven项目无法产生Maven Dependencies
- Android 5.0(Lollipop)中的SurfaceTexture,TextureView, SurfaceView和GLSurfaceView
- vs(win7) 报错
- 如何在Ubuntu QML应用中播放视频
- 关于Apache端口被类似VMware软件占用的解决方案