In ADF cannot skip columns in Copy activity Upsert

Yogesh Nikam 1 Reputation point
2022-11-02T05:04:44.133+00:00

I have generic pipeline to upsert data in target synapse tables. Column mapping is also dynamic(using json). I want to skip few column in mapping but I am getting error of column count mismatch.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,914 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 33,556 Reputation points Microsoft Employee
    2022-11-03T07:01:41.22+00:00

    HI @Yogesh Nikam ,

    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    As I understand your ask, you want to perform upsert using copy activity in Azure data factory where the mapping is dynamic, and you want to skip few columns from the mapping. Please let me know if my understanding about your query is incorrect.

    Kindly make sure you are removing the unwanted columns properties of both Source and sink json in the dynamic column mapping .

    I tried to replicate your case and it worked well for me. I removed 'Name' property from the Mapping. From the source, I updated three columns : 'Name','Country' and 'Contact' . However, since name column was not mapped , after the copy activity execution, the other two columns got updated but name column value remained unchanged.

    Kindly refer to the below video:

    256628-skipcolumninupsert.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

  2. Yogesh Nikam 1 Reputation point
    2022-11-03T07:59:03.92+00:00

    Sorry, I missed to mention the column which I want to skip is Identity column(Id IDENTITY(1,1) INT) as it is auto increment. But ADF copy UPSERT also looking for it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.