I am trying to make an exact copy of a table from Table storage into Azure SQL.
I have an issue with a column from the Source table(Table Storage) because it can have multiple data types, in my case String or DateTime. The problem occurs only when the column ArrivalTime from the first row retrieved has DateTime datatype. As I understood the datatype of the column is given by the first record.
I get the below error just in the case mentioned above because other String values from column can't be covenverted to DateTime.
In other cases when the column from first row retrived has String DataType I don't have any issue since any other different datatype can be converted to String.
Destination column from AzureSql is set to nvarchar, so this is not a problem. The error occurs Source side
Copy activity encountered a user error at Source side:
Error Message:
ErrorCode=UserErrorInvalidDataValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Column 'ArrivalTime' contains an invalid value 'DateTime.Null'.,Source=Microsoft.DataTransfer.Common,''Type=System.ArgumentException,Message=Specified cast is not valid.Couldn't store in ArrivalTime Column. Expected type is DateTimeOffset.,Source=System.Data,''Type=System.InvalidCastException,Message=Specified cast is not valid.,Source=System.Data,'.
Did somebody else faced this situation ? Is there any way to bypass this issue ?
Thanks