Azure Data Data HTTP端点到CosmosDB错误转换datetime

问题描述 投票:0回答:1

我有一个HTTP端点,它返回包含以下格式的日期时间的数据:

"RowInsertDateTime": "2018-09-10T15:31:21.223",

由于此错误,我已将数据工厂管道无法导入此行作为DATETIME:

"message": "ErrorCode=UserErrorInvalidDataValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=,Source=,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Column

'RowInsertDateTime'包含无效值'2018-09-10T15:39:50.33'。无法将'2018-09-10T15:39:50.33'转换为'DateTime',格式为'YYYY-MM-DDTHH:MM:SS'。,Source = Microsoft.DataTransfer.Common,''Type = System.FormatException,Message = String未被识别为有效的DateTime。,Source = mscorlib,''Type = Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message = Column'RowInsertDateTime'包含无效值'2018-09-10T15:39:50.33' 。无法将'2018-09-10T15:39:50.33'转换为'DateTime',格式为'YYYY-MM-DDTHH:MM:SS'。,Source = Microsoft.DataTransfer.Common,''Type = System.FormatException,Message = String未被识别为有效的DateTime。,Source = mscorlib,''Type = Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message = Column'RowInsertDateTime'包含无效值'2018-09-10T15:39:50.33' 。无法将'2018-09-10T15:39:50.33'转换为'DateTime',格式为'YYYY-MM-DDTHH:MM:SS'。,Source = Microsoft.DataTransfer.Common,''Type = System.FormatException,Message = String未被识别为有效的DateTime。,Source = mscorlib,''Type = Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message = Column'RowInsertDateTime'包含无效值'2018-09-10T15:39:50.33' 。无法将'2018-09-10T15:39:50.33'转换为'DateTime',格式为'YYYY-MM-DDTHH:MM:SS'。,Source = Microsoft.DataTransfer.Common,''Type = System.FormatException,Message = String未被识别为有效的DateTime。,Source = mscorlib,'“,

我试过设置YYYY-MM-DDTHH格式:MM:SS,但我也遇到了同样的失败。有任何想法吗?我认为日期时间格式有效。

datetime-format azure-data-factory azure-data-factory-2
1个回答
0
投票

我看到你有一个日期的毫秒,所以你可以尝试使用这种格式“yyyy-MM-ddTHH:mm:ss.fff”

© www.soinside.com 2019 - 2024. All rights reserved.