In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
# sqoop decompression software $sudo tar-zxvf sqoop-1.4.6.bin__hadoop-0.23.tar.gz-C / usr/local/$ pwd/usr/local/sqoop-1.4.6.bin__hadoop-0.23$ cd conf/$ sudo cp sqoop-env-template.sh sqoop-env.sh$ sudo vi sqoop-env.shexport HADOOP_COMMON_HOME=/usr/local/hadoop-2.7.4/export HADOOP_MAPRED_HOME=/usr/local/hadoop-2.7 .4 / # sqoop Import Oracle database into HDFS $sqoop import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-- table emp-- columns' empno Ename,job,sal,deptno'-M1-- target-dir'/ sqoop/emp'#sqoop Import Oracle into hive $sqoop import-- hive-import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-- table emp-M1-- columns' empno,ename,job,sal,deptno' # Import Oracle And specify the table name $sqoop import-- hive-import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-- table emp-M1-- columns' empno,ename,job,sal,deptno'-- hive-table emp1# to import Oracle Specify the whare condition $sqoop import-- hive-import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-- table emp-M1-- columns' empno,ename,job,sal,deptno'-- hive-table emp2 where 'deptno=10'# to import Oracle Use select$ sqoop import-- hive-import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-M1-- query 'select * from emp where sal < 1000 and $CONDITIONS'-- target-dir' / sqoop/emp3'-- hive-table emp3 $sqoop import-- hive-import-- connect jdbc:oracle:thin:@192.168.240.137:1521:orcl-- username scott-- password tiger-M1-- table myemp-- export-dir'/ sqoop/emp3'
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.