sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gent (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SQOOP-3450) Unable to rename columns and set type during sqoop import
Date Tue, 24 Sep 2019 14:28:00 GMT

     [ https://issues.apache.org/jira/browse/SQOOP-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Gent updated SQOOP-3450:
----------------------------
    Description: 
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
{code:java}
sqoop import --hive-import --query "SELECT month_id AS month, employee_id FROM employees"
--map-column-hive "month=int,employee_id=int"
{code}
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

```

  was:
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

```


> Unable to rename columns and set type during sqoop import
> ---------------------------------------------------------
>
>                 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
>            Priority: Major
>
> 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
> {code:java}
> sqoop import --hive-import --query "SELECT month_id AS month, employee_id FROM employees"
--map-column-hive "month=int,employee_id=int"
> {code}
> 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)

Mime
View raw message