Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

sqoop incremental import using composite primary key as merge-key

Solved Go to solution

sqoop incremental import using composite primary key as merge-key

Expert Contributor

sqoop incremental import using composite primary key as merge-key

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: sqoop incremental import using composite primary key as merge-key

Expert Contributor

Currently sqoop incremental does not support composite primary key as per the design,but an alternative would be to concatenate the composite primary key concat(PK1,PK2) as UniqueId while importing and using the UniqueId as --merger-key instead of a single primary key.

2 REPLIES 2
Highlighted

Re: sqoop incremental import using composite primary key as merge-key

Expert Contributor

Currently sqoop incremental does not support composite primary key as per the design,but an alternative would be to concatenate the composite primary key concat(PK1,PK2) as UniqueId while importing and using the UniqueId as --merger-key instead of a single primary key.

Re: sqoop incremental import using composite primary key as merge-key

New Contributor

Hi @Krishna Srinivas

I am facing the same issue, where in I have to specify the composite primary key in merge-key. But it is giving me the error. Can you please explain me on how can I achieve the above mentioned answer by taking an example. That will help me understand more clearly.

Thanks in Advance !!

Don't have an account?
Coming from Hortonworks? Activate your account here