You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "thomastechs (JIRA)" <ji...@apache.org> on 2013/06/24 14:14:20 UTC
[jira] [Commented] (SQOOP-1096) Sqoop generates bounding vals
queries with synatx error, when the number of mappers is greater than 1 and
there is WITH UR option in the query for DB2
[ https://issues.apache.org/jira/browse/SQOOP-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691918#comment-13691918 ]
thomastechs commented on SQOOP-1096:
------------------------------------
Please feel free to let us know your comments on this issue.
I have seen an issue raised at [SQOOP-474|https://issues.apache.org/jira/browse/SQOOP-474?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel]
But the SQOOP-474 does not have a fix related to multiple mappers and WITH UR syntax error.
> Sqoop generates bounding vals queries with synatx error, when the number of mappers is greater than 1 and there is WITH UR option in the query for DB2
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SQOOP-1096
> URL: https://issues.apache.org/jira/browse/SQOOP-1096
> Project: Sqoop
> Issue Type: Bug
> Components: build, connectors/generic
> Affects Versions: 1.4.2
> Reporter: thomastechs
> Labels: sqoop
>
> To reproduce this error, execute the sqoop query connecting to DB2 with the option WITH UR and number of mappers > 1 and a split by column:
> {code:title=Sample query|borderStyle=solid}
> sqoop import --connect jdbc:db2://<host>/hadoopguide --username <uname> --password <password> --query 'SELECT A_I,B_I,C_I,D_I FROM A where $CONDITIONS WITH UR' --split-by A_I -m 8 --target-dir /user/sample/test_with_ur;
> {code}
> Then the sqoop log is printed like :
> {code:title=Sample query|borderStyle=solid}
> INFO db.DataDrivenDBInputFormat: BoundingValsQuery: SELECT MIN(A_I), MAX(A_I) FROM (SELECT A_I,B_I,C_I,D_I FROM A where (1 = 1) WITH UR) AS t1
> ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-199, SQLSTATE=42601, SQLERRMC=WITH;AND OR HAVING GROUP INTERSECT ORDER FETCH EXCEPT UNION ), DRIVER=
> at org.apache.sqoop.mapreduce.db.DataDrivenDBInputFormat.getSplits(DataDrivenDBInputFormat.java:167)
> {code}
> If we explicitly execute the boundingvals query using the WITH UR option appended at the end of the query in the DB2, we can identify that the the query is executed successfully in the DB2. So, it means the WITH UR option is appended in the wrong position of the query .
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira