sqoop课件

sqoop:
导入:

import
--connect
jdbc:mysql://node3:3306/test
--username
root
--password
123
--as-textfile
--columns
id,name,msg
--table
psn
--delete-target-dir
--target-dir
/sqoop/data
-m
1

命令:
sqoop --options-file sqoop1

*************************************************
导入:

import
--connect
jdbc:mysql://node3/test
--username
root
--password
123
--as-textfile
--query
'select id, name, msg from psn where id like "1%" and $CONDITIONS'
--delete-target-dir
--target-dir
/sqoop/tmp
-m
1
--hive-home
/home/hive-1.2.1
--hive-import
--create-hive-table
--hive-table
t_test


*************************************************
导出:

export
--connect
jdbc:mysql://node3/test
--username
root
--password
123
-m
1
--columns
id,name,msg
--export-dir
/sqoop/data
--table
h_psn

 

posted @ 2018-07-05 10:14  uuhh  阅读(294)  评论(0)    收藏  举报