High severitydata source
Power BI Refresh Error:
UserErrorSqlBulkCopyFailed
What does this error mean?
An Azure Data Factory copy activity using bulk insert to write data into SQL Server or Azure SQL Database failed.
Common causes
- 1A source value cannot be cast to the target column's data type
- 2A NOT NULL constraint in the target table is violated by null values in the source data
- 3The source has more or fewer columns than the target table mapping expects
- 4A UNIQUE or PRIMARY KEY constraint violation due to duplicate values in the source data
- 5The target table has a computed column or identity column that conflicts with the insert
How to fix it
- 1Check the ADF copy activity error details for the specific SQL constraint or conversion error message.
- 2Enable 'Fault tolerance' in the copy activity to log and skip bad rows without failing the whole pipeline.
- 3Use a staging table as the sink and add a data quality check before merging to the final target.
- 4Add explicit column mappings in the copy activity to control which source columns map to which target columns.
- 5Pre-validate source data with a data flow or a SQL pre-copy script that filters out rows violating the target constraints.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-sql