Sqoop is used in an Hadoop environment to load data from a relational database upon an Hadoop platform. I have installed an Oracle 12.2 database. I tried to load data from that database to Hadoop. To do so, one needs to install a java jdbc driver to be able to access that database. For Oracle 12, two drivers are available: the ojdbc6.jar and the ojdbc7.jar. Both seem to work fine. I established this by putting both files on the /opt/cloudera/parcels/CDH/lib/sqoop/lib, which is used in a Cloudera environment to install the database drivers for sqoop. Subsequently, I verified the correct working with:
sqoop list-tables \ --connect jdbc:oracle:thin:@192.168.2.2:1521:orcl \ --username c##hr \ --password ine13258
I also tried to use ojdbc8.jar, but this provided an error, saying “Unsupported major.minor version 52.0”.
A similar exercise can be undertaken with mysql:
sqoop list-tables \ --connect jdbc:mysql://192.168.2.2/wordpress \ --username tom \ --password ine13258