7 steps to ‘Sqoop’ data from mySQL to Hadoop
- Create a test database and a test table init as root user.
2. Insert some sample records in to the table
3. quit mysql console and run sqoop help. you should see something like this.
4. Run sqoop import command as shown below
5. The Sqoop command self explanatory you — connect mysql with username and password supplying the table name, target directory in hdfs and tell sqoop that you are using mysql.jdbc.Driver
6. If the command runs successfully you should see something like “Retrieved # records”
7. Verify if the data has been imported in to HDFS.
Hence Sqoooooooooooooooooooooooooooooooooooooped !