Tim Gent created SQOOP-3450:
-------------------------------
Summary: Unable to rename columns and set type
Key: SQOOP-3450
URL: https://issues.apache.org/jira/browse/SQOOP-3450
Project: Sqoop
Issue Type: Bug
Environment: Sqoop 1.4.6-cdh5.15.1
Source database Oracle
Target database Hive
Reporter: Tim Gent
Using the --query option I try to both add new columns and to rename existing
ones during the migration.
Using the --map-column-hive option I try to specify types for all of my columns
However I am not able to specify types for any columns that I have renamed.
Example (irrelevant arguments omitted here) of when it doesn't work
```
sqoop import --hive-import --query "SELECT month_id AS month, employee_id FROM
employees" --map-column-hive "month=int,employee_id=int"
```
Note if I remove the column type mapping for month it works. Also note if I use
month_id in the column type mapping it still doesn't work.
Error is (including formatting error):
```
Import failed: No column by the name monthfound while importing data
```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)