Time for action – fixing the mapping and re-running the export
In this case, however, let us do what probably makes more sense—modifying the definition of the employee table to make it consistent in both data sources.
- Start the
mysql
utility:$ mysql -u hadoopuser -p hadooptest Enter password:
- Change the type of the
start_date
column:mysql> alter table employees modify column start_date timestamp;
You will receive the following response:
Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0
- Display the table definition:
mysql> describe employees;
- Quit the
mysql
tool:mysql> quit;
- Perform the Sqoop export:
sqoop export --connect ...
Get Hadoop Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.