Copy activity throwing an error, when a auto incremented column is there on the Sink side

Shweta Chavan 40 Reputation points
2024-05-15T22:53:21.2033333+00:00

Hello Team,

I am trying to copy data from Amazon S3 to Azure SQL database. On Azure SQL side I have set an autoincrement column(Row_Index) in a table, however the copy activity throws an error that "Column 'Row_Index' does not allow DBNull.Value". The Source doesn't have a Row_Index column.

I tried to delete the Row_Index from Sink schema ,the error still persist.

Is there a way to have an autoincrement column In Azure SQL, using copy activity, without getting an error.

Thankyou!

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,812 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,906 Reputation points Microsoft Employee
    2024-05-20T19:43:17.34+00:00

    @Shweta Chavan

    Thank you for confirming that the issue https://learn.microsoft.com/en-us/answers/questions/1662087/how-to-copy-the-data-from-amazon-s3-to-azure-sql-d?page=1&orderby=Helpful&comment=answer-1516080#newest-answer-comment is resolved by fixing the UTC time.

    For the copy activity throwing an error

    If the data from source is coming as null, the SQL column is configured with not null, so it not accepting nulls.

    Try using mapping dataflow look up activity, you can count the null values and redirect them.

    Regards,

    Oury