sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheolsoo Park (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SQOOP-452) Mysql free form queries fail if alias is not used.
Date Wed, 04 Apr 2012 18:47:18 GMT

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

Cheolsoo Park resolved SQOOP-452.
---------------------------------

    Resolution: Fixed
      Assignee: Cheolsoo Park

SQOOP-468 fixes the issue.
                
> Mysql free form queries fail if alias is not used.
> --------------------------------------------------
>
>                 Key: SQOOP-452
>                 URL: https://issues.apache.org/jira/browse/SQOOP-452
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/mysql
>    Affects Versions: 1.4.0-incubating
>            Reporter: Prashant Gokhale
>            Assignee: Cheolsoo Park
>            Priority: Minor
>
> Command I am running:
> sqoop import --connect jdbc:mysql://<mysqlhost>/mysqltestdb --username xxx --password
xxxx --query 'select testtable.id, testtable2.fname from testtable join testtable2 on (testtable.id
= testtable2.id ) where testtable.id < 3 AND $CONDITIONS' --split-by testtable.id --target-dir
joinresults
> Sqoop fails with this error message
> {noformat}
> 2/03/02 12:12:08 INFO db.DataDrivenDBInputFormat: BoundingValsQuery: SELECT MIN(testtable.id),
MAX(testtable.id) FROM (select testtable.id as id, testtable2.fname as fname from testtable
join testtable2 on (testtable.id = testtable2.id ) where testtable.id < 3 AND  (1 = 1)
) AS t1
> 12/03/02 12:12:08 INFO mapreduce.JobSubmitter: Cleaning up the staging area /user/prashant/.staging/job_1330641624236_0016
> 12/03/02 12:12:09 ERROR security.UserGroupInformation: PriviledgedActionException as:prashant
(auth:SIMPLE) cause:java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Unknown column 'testtable.id' in 'field list'
> 12/03/02 12:12:09 ERROR tool.ImportTool: Encountered IOException running import job:
java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column
'testtable.id' in 'field list'
> {noformat}
> The job runs successfully if I modify the query:
> sqoop import --connect jdbc:mysql://<mysqlhost>/mysqltestdb --username xxxx --password
xxxx --query 'select t1.id as id, t2.fname as fname from testtable as t1 join testtable2 as
t2 on (t1.id = t2.id ) where t1.id < 3 AND $CONDITIONS' --split-by t1.id --target-dir joinresults
> It would be nice to have it documented at least.

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

        

Mime
View raw message