Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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
New Member

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