Could not create constraint or index. See previous errors.

Greenwood, Justin -Administrator 75 Reputation points
2023-06-23T08:44:41.76+00:00

Hi All so I have been running an incremental pipeline but last month it failed so I followed the info in https://learn.microsoft.com/en-us/answers/questions/1195752/copy-dataverse-data-into-azure-sql-using-synapse-l

and it worked fine for a week or 2 but now it is failing in the step DataversToSQL1

and the error I am getting is as follows

Operation on target ForEachEntity failed: Activity failed because an inner activity failed; Inner activity name: CreateTable, Error: Column name 'Id' does not exist in the target table or view.

Could not create constraint or index. See previous errors.

I have found the table with the error and I have recreated it as a basic table (no keys) and I still get the above

I created it as it was and still I get the above

The column ID is in the table but for some reason I am getting the error

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2023-06-26T09:12:42.0433333+00:00

    Hi Greenwood, Justin -Administrator ,

    Thankyou for using Microsoft Q&A platform. The error message you are seeing indicates that the column 'Id' does not exist in the target table or view. You also mentioned that you have already recreated the table without keys, but the error persists. Please let me know if that is not the correct understanding.

    Could you please ensure that the

    • Case sensitivity of the columname is same for source and target
    • There is no mismatch in the data types
    • There is no limitation in the column length.

    Additionally, for better understanding , would you be able to provide the screenshot of mapping tab of your copy activity. In case you are having default mapping and there is difference in the schema of source and sink, then you need to go for explicit mapping by importing the schemas of source and sink and modifying it manually.

    Check this video for more details: Schema Mapping in Copy activity of ADF pipeline

    Hope it helps. Kindly accept the answer by clicking the accept answer button. Thankyou


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.