ErrorCode=UserErrorInvalidColumnMappingColumnNotFound

Lucy Liu 10 Reputation points
2024-07-11T01:35:49.5333333+00:00

I'm having the a similar issue copying from csv to azure sql db as this post.

I'm getting the same error, however the behavior is a little different:

  • The column indicated in the error is added to the Source under Additional Columns section and exists in the Sink table (both uppercase).
  • The copy activity is nested in a ForEach activity that loops through about 70 files that pulls data into corresponding tables. Tables are auto created in the DB if it does not already exist. The failure occurs on only 1 file.
  • Even stranger is that when I check the sink table in sql the expected data is copied.

I've even tried deleting the sink table completely and having the pipeline auto create a new table. The error persists even when the table is created and the data is copied successfully.

Any help to resolve this error is appreciated.

Thanks!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 14,585 Reputation points Microsoft External Staff Moderator
    2024-07-11T07:06:49.9533333+00:00

    Hi @Lucy Liu

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

    Are you doing explicit mapping (Import Schemas in Mapping section of Copy) or auto mapping from source to sink? If you are doing auto mapping, could you please try explicit mapping by clicking import schemas in Mapping section of your copy activity.108473-image.png You will be experiencing this error message when you pass mapping without Import Schemas:

    108455-adf-clmmappingwithoutimport.gif

    You are able to resolve this error message when you pass mapping with Import Schemas:

    108456-adf-clmmappingwithimport.gif

    If the issue still persists, please do let us know. Glad to help.

    Hope this information helps!


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.