Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

[SQOOP-3002] sqoop merge tool composite merge-key #26

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

kevin00chen
Copy link

@kevin00chen kevin00chen commented Aug 22, 2016

JIRA Issue:https://issues.apache.org/jira/browse/SQOOP-3002
Sqoop Merge Tool can only specify one column by using --merge-key argument.
When i need to specify two or more column, Sqoop-1.4.6 will throw an Exception.

StringBuilder keyFieldsSb = new StringBuilder();
for (String str : keyColName.split(",")) {
keyFieldsSb.append("+").append(fieldMap.get(str).toString());
keyFieldsSb.append(connectStr).append(fieldMap.get(str).toString());
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example one table has two column, a and b

Field a Field b
a+ b
a +b

when use "+" to connect two field, two record will has same keyObj.
To avoid this i use a String contains one byte.

@liz-z17
Copy link

liz-z17 commented Sep 25, 2016

Hi @kevin00chen ,
Sqoop project currently does not accept pull requests. To contribute, you will need to generate patch and upload it to the JIRA (of course if there's no corresponding JIRA issue, you will also need to create one first).
See the instructions here: https://cwiki.apache.org/confluence/display/SQOOP/How+to+Contribute
If you need more directions, I'd be happy to help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants