When importing a bunch of large MySQL tables into HDFS using Sqoop, I forgot to include the –hive-import flag. So now I’ve got these tables sitting in HDFS, and am wondering if there’s an easy way to load the data into Hive (without writing the LOAD DATA statements myself).
I tried using sqoop create-hive-table:
./bin/sqoop create-hive-table --connect jdbc:mysql://xxx:3306/dw --username xxx --password xxx --hive-import --table tweets
While this did create the correct hive table, it didn’t import any data into it. I have a feeling I’m missing something simple here…
For the record, I am using Elastic MapReduce, with Sqoop 1.4.1.
Can’t you create an external table in hive and point it to these files?