Column name or path duplicated in 'source' under 'mappings

Abhishek Vyas 101 Reputation points
2021-05-26T17:43:36.11+00:00

Hi,

I am getting following error during pipeline run.

Operation on target ac_ApplyMapping failed: Column name or path 'StudentId' 
duplicated in 'source' under 'mappings'. Please check it in 'mappings'. 

In the Copy Activity we are applying following mappings.

{
    "type": "TabularTranslator",
    "mappings": [{
            "source": {
                "name": "StudentId",
                "type": "string"
            },
            "sink": {
                "name": "StudentId_Primary",
                "type": "string"
            }
        }, {
            "source": {
                "name": "StudentId",
                "type": "string"
            },
            "sink": {
                "name": "StudentId_Secondary",
                "type": "string"
            }
        }
    ]
}

Is there any way to handle this scenario?

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

Answer accepted by question author
  1. PRADEEPCHEEKATLA 91,496 Reputation points Moderator
    2021-05-27T09:16:16.393+00:00

    Hello @Abhishek Vyas ,

    Thanks for the question and using MS Q&A platform.

    Duplicating mappings in copy activity is not allowed.

    Workaround:

    Step1: Copy activity => Source Tab contains a feature to add "additional columns". Using this, add a new column on top of your source columns to duplicate StudentID.

    Copy Activity Source tab configurations :

    100241-image.png

    Step 2: In Copy activity => Mappings use above added new column for Secondary Student ID mapping.

    100232-image.png

    Hope this helps. Do let us know if you any further queries.

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

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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