我遇到了Azure数据工厂和存储过程的问题。
我已将SP设置为输入数据的接收器:
"sink": {
"type": "SqlSink",
"sqlWriterStoredProcedureName": "spAddProducts",
"storedProcedureParameters": {
"stringProductData": {
"value": "str1"
}
},
并且在执行后我必须处理大约200,000条记录,但经过一些有限数量的处理行(大约10k)后,我发现了错误:
Copy activity met invalid parameters:
ErrorCode=InvalidParameter,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
Message=The value of the property '' is invalid: 'The SqlParameter is already contained by another
SqlParameterCollection.'.,Source=,''Type=System.ArgumentException,
Message=The SqlParameter is already contained by another SqlParameterCollection.,Source=System.Data,'.
SP代码:
CREATE PROCEDURE spAddProducts @DimProducts [dbo].[ProductsType] READONLY, @stringProductData varchar(256)
AS
BEGIN
MERGE [dbo].[DimProducts] AS tpr
USING @DimProducts AS spr
ON tpr.ID = spr.ID
WHEN MATCHED AND (tpr.Name <> spr.Name OR tpr.NameInternational <> spr.NameInternational OR tpr.ProductType <> spr.ProductType) THEN
UPDATE SET tpr.Name = spr.Name, tpr.NameInternational = spr.NameInternational, tpr.ProductType = spr.ProductType
WHEN NOT MATCHED THEN
INSERT (Name, NameInternational, ProductType, ID)
VALUES(spr.Name, spr.NameInternational, spr.ProductType, spr.ID)
;
END
答案 0 :(得分:1)
我来自产品团队。我们确定了这个问题,上周已经部署了修复程序。感谢您报告此缺陷。