Import Sql Query results into HDFS

We can use SQOOP to Import the results of a sql query from a relational database into HDFS
Let us take the following RDBMS Mysql Table called student.
Here let us only import std_id = 103 Query Results into HDFS using SQOOP IMPORT command.

Let us import row where std_id = 103 using SQOOP IMPORT.


Let us run the above SQOOP Import and see the Execution flow of the SQOOP IMPORT using –query.
Please note that we no need to use –table parameter if we use –query.

if you are using where condition, make sure you end with AND $CONDITIONS in a single qoates ‘ or ” ”

Let us check the output in HDFS.

Leave a comment

Your email address will not be published. Required fields are marked *