Home > Database > Mysql Tutorial > body text

将记录从mysql导出到hdfs中_MySQL

WBOY
Release: 2016-06-01 13:32:18
Original
932 people have browsed it

bitsCN.com

将记录从mysql导出到hdfs中

 

01ConnectURL=jdbc:mysql://localhost:3306/user_action0203UserName=root0405PassWord=1234560607OutputPath=/hdfs/recommend/user_action/watch_record0809TableName= watch_record1011Columns=id,uid,mid,timestamp121314IfJobCreated =`sqoop job list | grep import_ watch_record`1516#检查import_ watch_record这个job是否已经创建 如果未创建则创建1718if [ $IfJobCreated = ’’ ] then1920sqoop  job  import_ watch_record /2122  --create  --import /2324  --connect  $ConnectURL/2526  --username  $UserName/2728  --password  $PassWord/2930  --target-dir  $OutputPath/3132  --m  1/3334  --table  $TableName/3536  –columns  $Columns/3738  --incremental  append/3940  --check-column  id/4142  --last-value  04344fi4546  4748sqoop  job --exec import_ watch_record
Copy after login

 

 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!