Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

sqoop incremental import using composite primary key as merge-key

avatar
Super Collaborator

sqoop incremental import using composite primary key as merge-key

1 ACCEPTED SOLUTION

avatar
Super Collaborator

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.

View solution in original post

2 REPLIES 2

avatar
Super Collaborator

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.

avatar

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