question

AbhishekVyas-4546 avatar image
0 Votes"
AbhishekVyas-4546 asked PRADEEPCHEEKATLA-MSFT commented

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

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
1 Vote"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @AbhishekVyas-4546,

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.


image.png (105.6 KiB)
image.png (76.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Pradeep it is working.

0 Votes 0 ·

Hello @AbhishekVyas-4546,

Glad to know it helped.

0 Votes 0 ·