簡體   English   中英

Azure數據工廠和存儲過程

[英]Azure data factory and stored procedure

我遇到了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

我來自產品團隊。 我們發現了問題,該修復程序已於上周部署。 感謝您報告缺陷。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM