[
https://issues.apache.org/jira/browse/SQOOP-976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620049#comment-13620049
]
Waldyn Benbenek commented on SQOOP-976:
---------------------------------------
Jarek,
The use case is a simple one. The user wants to regularly import records from a
table. The key column (the only column with consistent data that can be
recognized and sorted) is character based. The table I tried on has the column
CUSTMERID with the following values:
CUST1
CUST2
CUST3
CUST4
.
.
CUST8
This is obviously limited. To make this work in a table with new records being
added continuously, one needs a scheme like:
CUST000000001
Etc.
Our customers have key columns that are character based quite often.
Anyway, the problem is the code which generates the query to specify the range
does not take character values into account.
It is a simple change in ImportTool around line 300
if (checkColumnType == Types.CHAR){
prevEndpoint="'"+prevEndpoint+"'";
nextIncrementalValue = "'"+nextIncrementalValue+"'";
}
Everything works fine with that and it does not affect other cases.
Thanks,
Wally Benbenek
> Incorrect SQL when incremental criteria is text column
> ------------------------------------------------------
>
> Key: SQOOP-976
> URL: https://issues.apache.org/jira/browse/SQOOP-976
> Project: Sqoop
> Issue Type: Bug
> Components: tools
> Affects Versions: 1.4.3
> Environment: incremental import on table using text column
> Reporter: Waldyn Benbenek
> Fix For: 1.4.4
>
>
--
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