0

我遇到了 Azure 数据工厂和存储过程的问题。

我已将 SP 设置为输入数据的接收器:

"sink": {
                        "type": "SqlSink",
                "sqlWriterStoredProcedureName": "spAddProducts",
                    "storedProcedureParameters": {
                        "stringProductData": {
                            "value": "str1"
                        }
                    },

并且在执行之后我必须处理大约 200k 记录,但是在处理了一些有限数量的行(大约 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
4

1 回答 1

1

我来自产品团队。我们发现了这个问题,上周已经部署了修复程序。感谢您报告缺陷。

于 2015-05-06T02:05:33.927 回答