Import RDBMS data into Hive
You can test the Apache Sqoop import command and then execute the command to import relational database tables into Hive.
- Apache Sqoop is installed and configured.
- A Hive Metastore is associated with your HDFS cluster.
You can test the Apache Sqoop import command and then execute the command to import relational database tables into Hive.
sqoop eval --connect jdbc:mysql://db.foo.com/bar \
--query "SELECT * FROM employees LIMIT 10"
sqoop import --connect jdbc:mysql://db.foo.com:3306/corp \
--table EMPLOYEES \
--hive-import \
--create-hive-table \
--hive-table mydb.newtable