Import data from MySQL using JOIN in Apache Sqoop || Where Clause without Query in Sqoop

preview_player
Показать описание
1. Import data from MySQL using JOIN in Sqoop
Example:
Sqoop import
--connect jdbc:mysql://localhost/sales
--username root
--password password
--target-dir /user/YT/joinedData
-m 2
Above SQL will display all those student who belongs to India with the student name and department name.

2. Where Clause without query in Sqoop:
Here we are not using the query, using only table name and where clause. It will return all the matching rows.
Example:
Sqoop import
--connect jdbc:mysql://localhost/sales
--username root
--password password
--table students
--target-dir /user/YT/studentsCountryWiseData
--where country_name = ‘India’
-m 1

This import statement stored all those students in target directory location, who belongs to India.
Рекомендации по теме
Комментарии
Автор

you are awesome and you deserver lots of appreciation..

ashokreddyavutala
visit shbcf.ru