sqoop import --connect jdbc:mysql://localhost/Edureka --username root -P --query 'SELECT tab1.id,tab1.name,tab2.age FROM tab1 JOIN tab2 USING(id) WHERE $CONDITIONS' --split-by id --target-dir /user/hive/warehouse/jointab
Note: There are four output file has been created since there are four records including the two tables and the result will be two records.
importing mutiple tables using sqoop Print
Modified on: Thu, 19 May, 2016 at 5:42 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.