Hi Sandip Shelke,
Thanks for reaching out to Microsoft Q&A.
The error usererrorinvalidcolumnmappingcolumnnotfound in adf usually occurs when there's a discrepancy in the column mapping configuration within your data copy activity, even if the column names appear correct in both the source and destination tables.
- Verify that the column name 'or_no' exists exactly as named in both the source and destination tables. Pay special attention to spaces or special characters in the column names.
- Inspect copy activity mapping: go to the mapping tab of the copy data activity in your adf pipeline.
-
Ensure that the column mappings are explicitly specified and that 'or_no' is correctly mapped from the source to the destination. Sometimes, auto-mapping can cause issues if not accurately detected.
- Check if schema validation is enabled and might be causing this error. You can try disabling schema validation as a test to see if the error persists.
- Since the error message includes a space before 'or_no', it's possible that there might be leading or trailing spaces in the column name in the source query or in the mapping configuration. Make sure there are no unintended spaces:
-
In adf mapping, ensure the column name does not include unwanted spaces.in sql dbs, you can use trim() function to ensure there are no leading/trailing spaces around your column names.
- Check if the database settings on either source or destination enforce case sensitivity. Sql server, for instance, is not case-sensitive by default, but other databases or systems like postgresql can be.
- Review the detailed error messages in the monitoring logs of adf. This might give you more context or clues on why 'or_no' is reported as not found. Ensure that the data types and nullable settings of or_no are compatible between the source and destination schemas.
If after checking these steps the issue still occurs, you might consider explicitly defining the column in the source query (if applicable) and ensuring that the query output is exactly as expected. This can sometimes resolve hidden issues not apparent in direct schema comparisons.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.