week6
Lab #2
Lab #2: Import the Device table from MySQL
Narender Reddy Kudumula
University of Cumberlands
Data Science & Big Data Analysis (ITS-836)
Prof. Dr. Gasan Elkhodari
09/18/2019
Import the Device table from MySQL
1. Open a new terminal window if necessary.
2. Get familiar with Sqoop by running the sqoop command line
$Sqoop help
3. List the table in Loudacre database:
$ sqoop list-tables \ --connect jdbc:mysql://localhost/loudacre \ --username training --password training
4. Run the sqoop import command to see its options: $ sqoop import --help
5. *Use Sqoop to import the device table in the loudacre database and save it in HDFS under /loudacre:
Creating import-device.sh file using vi editor to import the device table in the loudacre database and save it in HDFS under /loudacre
Given permission to import-device.sh file using “chmod 755” and run “./import-device.sh”
Viewing the moved device table files