I wanted to copy data from form data lake present in .tsv file to Azure data warehouse but there are 2 columns that are in date datatype and because of that I am facing issues while mapping the columns. And because of that I am not able to load the data. I can use u-SQL activity only if needed.
1 Answers
1
votes
I tried and tested, always get the error message:
"ErrorCode=UserErrorInvalidDataValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
Message=Column 'dd' contains an invalid value '20190101'.,Source=Microsoft.DataTransfer.ServiceLibrary,''Type=System.ArgumentException,Message=String was not recognized as a valid DateTime.Couldn't store <20190101> in dd Column. Expected type is DateTime.,Source=System.Data,''Type=System.FormatException,Message=String was not recognized as a valid DateTime.,Source=mscorlib,'",
"failureType": "UserError",
"target": "Copy_b70"
If you don't want to change your tsv file, I suggest you to using the Data Flow Derived Column. It can help covert the "20100101" data to a correct date format.
Derived Column:
Using this Expression for field Column "20100101":
add( (substring(Column_2, 1, 4)),'-')+
add((substring(Column_2, 5, 2)), '-')+
substring(Column_2, 7, 2)
It works ok.
Hope this helps.
date
datatype, please check if the date string in your tsv file is correctly? Please reference Supported string literal formats for date – Leon Yue