You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by Amit <mr...@gmail.com> on 2013/05/08 09:17:10 UTC

Failed to import Oracle Table - case sensitive column name

I am trying to import a oracle table with Sqoop 1.4.3 with following
information -

  *Column Name* *Data Type* *Primary Key*  Company_ID NUMBER true
Formal_Name VARCHAR2 false  Ticker VARCHAR2 false  Cntry_Nme VARCHAR2 false
Industry VARCHAR2 false  Market_Cap NUMBER false  Daily_Change NUMBER false
Weekly_Change NUMBER false  Monthly_Change NUMBER false  Yearly_Change
NUMBER false  Ratings VARCHAR2 false  Current_Price NUMBER false
Current_Name VARCHAR2 false  Sector_Description VARCHAR2 false

with the command -

./sqoop import --connect jdbc:oracle:thin:@ORACLE_SERVER:1530:impl
 --username APP --password APP --table COMPANIES --target-dir
/landscape/APP/COMPANIES

The import process failed with -

java.sql.SQLException: ORA-00904: "SECTOR_DESCRIPTION": invalid identifier

The import process not taking care of case sensitive column names. How to
achieve that? Am I doing anything wrong? Please help.

-- 
Thanks,
Am
it

Re: Failed to import Oracle Table - case sensitive column name

Posted by Venkat Ranganathan <vr...@hortonworks.com>.
case sensitivity is an issue.  I would recommend creating a view with case
insensitive names and using the view to import.   If that is not an option,
you can use a query and in your case you can only use one mapper only as
the split by column is also case sensitive.

Note that case sensitive tables will fail to import when you use
import-all-tables as the view will not be used in that case


On Wed, May 8, 2013 at 12:17 AM, Amit <mr...@gmail.com> wrote:

> I am trying to import a oracle table with Sqoop 1.4.3 with following
> information -
>
>   *Column Name* *Data Type* *Primary Key*  Company_ID NUMBER true
> Formal_Name VARCHAR2 false  Ticker VARCHAR2 false  Cntry_Nme VARCHAR2
> false  Industry VARCHAR2 false  Market_Cap NUMBER false  Daily_Change
> NUMBER false  Weekly_Change NUMBER false  Monthly_Change NUMBER false
> Yearly_Change NUMBER false  Ratings VARCHAR2 false  Current_Price NUMBER
> false  Current_Name VARCHAR2 false  Sector_Description VARCHAR2 false
>
> with the command -
>
> ./sqoop import --connect jdbc:oracle:thin:@ORACLE_SERVER:1530:impl
>  --username APP --password APP --table COMPANIES --target-dir
> /landscape/APP/COMPANIES
>
> The import process failed with -
>
> java.sql.SQLException: ORA-00904: "SECTOR_DESCRIPTION": invalid identifier
>
> The import process not taking care of case sensitive column names. How to
> achieve that? Am I doing anything wrong? Please help.
>
> --
> Thanks,
> Am
> it
>