Azure数据工厂和存储过程 [英] Azure data factory and stored procedure
本文介绍了Azure数据工厂和存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了Azure数据工厂和存储过程的问题.
I've got problem with Azure Data Factory and Stored Procedure.
我已将SP设置为输入数据的接收器:
I've set SP as sink for input data:
"sink": {
"type": "SqlSink",
"sqlWriterStoredProcedureName": "spAddProducts",
"storedProcedureParameters": {
"stringProductData": {
"value": "str1"
}
},
执行后,我必须处理大约200k条记录,但是在处理了有限数量的行(大约10k)之后,我遇到了错误:
and after execution I've got to process about 200k records, but after some limited number of processed rows (about 10k), I've got error:
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
推荐答案
我来自产品团队.我们发现了问题,并且该修复程序已于上周部署.感谢您报告缺陷.
I'm from the product team. We identified the issue and the fix has been deployed last week. Thanks for reporting the defect.
这篇关于Azure数据工厂和存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文