我在复制活动期间在 ADF 中收到以下错误:
ErrorCode=UserErrorSchemaMappingCannotInferSinkColumnType,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Data type of column 'contact_adres_begindatum' can't be inferred from 1st row of data, please specify its data type in mappings of copy activity or structure of DataSet.,Source=Microsoft.DataTransfer.Common,'
我尝试从返回 json 格式响应的 API 调用复制数据,并尝试将其复制到 Azure SQL 数据库。
我遇到的问题是当 json 数据包含一些“null”值时。 json 数据如下所示:
可以看出,这为“contact_adres_begindatum”提供了“Null”值。
基本上,每当 API 响应的 json 格式中给出“null”值时,我都想在 SQL 数据库中将其设置为 NULL。
我到处搜索,但找不到解决这个问题的方法。我该如何解决这个问题?感谢您的帮助!
我尝试过谷歌搜索、ChatGPT、微软论坛,但我找不到如何解决这个问题。
在复制活动的映射选项卡上,为接收器侧的
contact adres begindatum
列选择字符串数据类型,如下所示:
这样做之后,复制活动将调试成功,没有任何错误,并且数据将被复制到SQL数据库中,如下所示: