Hi!

I have table tb1 defined by:
CREATE TABLE tb1(user int, counter int) PARTITIONED BY (day string) STORED AS TEXTFILE

I want to export data from this table into mysql table defined by:
CREATE TABLE tb2(user int, counter int, day string)

I've tried to use Sqoop in order to do this but Sqoop doesn't allow to export directory with partitions - while trying: sqoop --connect jdbc:mysql://test-db.gadu/crunchers --username crunchers --password RydBert3 --table tb2 --export-dir /user/hive/warehouse/tb1
I get:
10/06/18 13:55:03 WARN mapreduce.ExportJob: IOException checking SequenceFile header: java.io.IOException: Cannot open filename /user/hive/warehouse/tb1/day=2010-04-01
It is possible to do something like this:
sqoop --connect jdbc:mysql://test-db.gadu/crunchers --username crunchers --password RydBert3 --table tb3 --export-dir /user/hive/warehouse/tb1/day=2010-04-01
using mysql table defined by:
CREATE TABLE tb3(user int, counter int),
but it is not the thing I want to do, because I want to have "day" column in mysql table.

Does someone know what to do in order to load this data into mysql?

Cheers,
Szymon Gwóźdź

Reply via email to