You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Eric Wadsworth (Created) (JIRA)" <ji...@apache.org> on 2011/12/19 23:31:32 UTC

[jira] [Created] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Oracle table names and table owner names should be uppercased in the code
-------------------------------------------------------------------------

                 Key: SQOOP-415
                 URL: https://issues.apache.org/jira/browse/SQOOP-415
             Project: Sqoop
          Issue Type: Bug
          Components: connectors/oracle
    Affects Versions: 1.4.0-incubating
            Reporter: Eric Wadsworth
             Fix For: 1.4.1-incubating


Using sqoop with oracle fails for me, with this error:
ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Eric Wadsworth (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Wadsworth updated SQOOP-415:
---------------------------------

    Attachment: oracle_table_name_and_table_owner_names_uppercase.patch

When I build it with this patch, it then works. Note that making the table name uppercase on the command line still fails; this piece of code is needed to make it work with oracle (at least for me).
                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_table_name_and_table_owner_names_uppercase.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Eric Wadsworth (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Wadsworth updated SQOOP-415:
---------------------------------

    Attachment:     (was: oracle_table_name_and_table_owner_names_uppercase.patch)
    
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174320#comment-13174320 ] 

jiraposter@reviews.apache.org commented on SQOOP-415:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3266/
-----------------------------------------------------------

(Updated 2011-12-21 19:03:52.238073)


Review request for Sqoop.


Changes
-------

Removed the original patch I had submitted, and replaced it with a new one. This one checks for double-quotes around oracle table names and owner names, and uppercases them if they aren't quoted.


Summary (updated)
-------

Uppercase table name and table owner name if it's not surrounded by double quotes.


This addresses bug SQOOP-415.
    https://issues.apache.org/jira/browse/SQOOP-415


Diffs (updated)
-----

  /src/test/com/cloudera/sqoop/manager/OracleManagerTest.java 1221519 
  /src/java/org/apache/sqoop/manager/OracleManager.java 1221519 

Diff: https://reviews.apache.org/r/3266/diff


Testing (updated)
-------

This patch includes a unit test. Before the patch, sqoop fails for me when connecting to oracle. When built with this patch, it works. "ant test" passes.


Thanks,

Eric


                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Eric Wadsworth (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174318#comment-13174318 ] 

Eric Wadsworth commented on SQOOP-415:
--------------------------------------

Patch submitted for review: https://reviews.apache.org/r/3266/
                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Jarek Jarcec Cecho (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Jarcec Cecho updated SQOOP-415:
-------------------------------------

    Fix Version/s:     (was: 1.4.1-incubating)
    
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176720#comment-13176720 ] 

jiraposter@reviews.apache.org commented on SQOOP-415:
-----------------------------------------------------



bq.  On 2011-12-28 07:43:54, Arvind Prabhakar wrote:
bq.  > Eric - thanks for the patch. Were you able to successfully import data from a table with mixed/lower case name? When I tried out your change, I ran into https://issues.apache.org/jira/browse/CLI-185 which is fixed for 1.3 release of Commons-CLI but there does not seem to be an ETA on that release yet.

Arvind,

Thanks for looking at the patch!

That CLI-195 looks like a mess, I wish I hadn't stepped in it. I'm going to do some more testing around this patch.

--- wad


- Eric


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3266/#review4133
-----------------------------------------------------------


On 2011-12-21 19:03:52, Eric Wadsworth wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3266/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-12-21 19:03:52)
bq.  
bq.  
bq.  Review request for Sqoop.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Uppercase table name and table owner name if it's not surrounded by double quotes.
bq.  
bq.  
bq.  This addresses bug SQOOP-415.
bq.      https://issues.apache.org/jira/browse/SQOOP-415
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/test/com/cloudera/sqoop/manager/OracleManagerTest.java 1221519 
bq.    /src/java/org/apache/sqoop/manager/OracleManager.java 1221519 
bq.  
bq.  Diff: https://reviews.apache.org/r/3266/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  This patch includes a unit test. Before the patch, sqoop fails for me when connecting to oracle. When built with this patch, it works. "ant test" passes.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eric
bq.  
bq.


                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Eric Wadsworth (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174312#comment-13174312 ] 

Eric Wadsworth edited comment on SQOOP-415 at 12/21/11 6:59 PM:
----------------------------------------------------------------

I just removed the previous patch, and replaced it with a new one.

For oracle, if a table name or table owner name is not surrounded by double quotes, uppercase it.
                
      was (Author: wad):
    For oracle, if a table name or table owner name is not surrounded by double quotes, uppercase it.
                  
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Eric Wadsworth (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Wadsworth updated SQOOP-415:
---------------------------------

    Attachment: oracle_casing.patch

For oracle, if a table name or table owner name is not surrounded by double quotes, uppercase it.
                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176505#comment-13176505 ] 

jiraposter@reviews.apache.org commented on SQOOP-415:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3266/#review4133
-----------------------------------------------------------


Eric - thanks for the patch. Were you able to successfully import data from a table with mixed/lower case name? When I tried out your change, I ran into https://issues.apache.org/jira/browse/CLI-185 which is fixed for 1.3 release of Commons-CLI but there does not seem to be an ETA on that release yet. 

- Arvind


On 2011-12-21 19:03:52, Eric Wadsworth wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3266/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-12-21 19:03:52)
bq.  
bq.  
bq.  Review request for Sqoop.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Uppercase table name and table owner name if it's not surrounded by double quotes.
bq.  
bq.  
bq.  This addresses bug SQOOP-415.
bq.      https://issues.apache.org/jira/browse/SQOOP-415
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/test/com/cloudera/sqoop/manager/OracleManagerTest.java 1221519 
bq.    /src/java/org/apache/sqoop/manager/OracleManager.java 1221519 
bq.  
bq.  Diff: https://reviews.apache.org/r/3266/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  This patch includes a unit test. Before the patch, sqoop fails for me when connecting to oracle. When built with this patch, it works. "ant test" passes.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eric
bq.  
bq.


                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_casing.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173352#comment-13173352 ] 

jiraposter@reviews.apache.org commented on SQOOP-415:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3266/
-----------------------------------------------------------

(Updated 2011-12-20 17:54:17.588744)


Review request for Sqoop.


Summary
-------

Uppercase table name and table owner name


This addresses bug SQOOP-415.
    https://issues.apache.org/jira/browse/SQOOP-415


Diffs
-----

  /src/java/org/apache/sqoop/manager/OracleManager.java 1220973 

Diff: https://reviews.apache.org/r/3266/diff


Testing
-------

Did not add any unit testing for this. Before the patch, sqoop fails for me when connecting to oracle. When built with this patch, it works. "ant test" passes.


Thanks,

Eric


                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_table_name_and_table_owner_names_uppercase.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SQOOP-415) Oracle table names and table owner names should be uppercased in the code

Posted by "Arvind Prabhakar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SQOOP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172933#comment-13172933 ] 

Arvind Prabhakar commented on SQOOP-415:
----------------------------------------

Eric, the OracleManager uses catalog queries for looking up metadata which requires case sensitive sepcification of user name and table name. If the user/table name was not quoted at the time of creation, Oracle by default converts them to upper case and hence you see this problem. It is also documented in the troubleshooting guide [1]. 

One way to alleviate this problem is to do modify Sqoop behavior so as to mimic Oracle's handling of such literals. In other words, if the specified user/table name is not quoted, Sqoop should convert them to upper case. If they are quoted, they should remain as specified. 

[1] http://incubator.apache.org/sqoop/docs/1.4.0-incubating/SqoopUserGuide.html#id1774574
                
> Oracle table names and table owner names should be uppercased in the code
> -------------------------------------------------------------------------
>
>                 Key: SQOOP-415
>                 URL: https://issues.apache.org/jira/browse/SQOOP-415
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle
>    Affects Versions: 1.4.0-incubating
>            Reporter: Eric Wadsworth
>             Fix For: 1.4.1-incubating
>
>         Attachments: oracle_table_name_and_table_owner_names_uppercase.patch
>
>
> Using sqoop with oracle fails for me, with this error:
> ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira