简体   繁体   English

Azure SQL 具有接收器存储过程的数据工厂复制活动

[英]Azure SQL Data Factory Copy Activity with Sink Stored Procedure

I cant get this going and seem not to find solutions on this forum.我无法做到这一点,似乎没有在这个论坛上找到解决方案。 I am new to Azure我是 Azure 的新手

I have successfully established a direct SQL Query copy activity from on Prem SQL Server to Azure SQL.我已经成功建立了一个直接的Z9778840A0100CB30C982876741B0B5A2A Q QUERY ACPERY活动,从PREM Z9778840A0A0A0CB30C9828741B0B5A2Z SERVE上的PREM Z9778840A0A0AB041B5AB5AB5AB51B580F17772207772377F1377F1377F1377F151F151F151F151F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1CC.F1CC。 在此处输入图像描述

When I proceed to edit to include a Stored Procedure it fails.当我继续编辑以包含存储过程时,它失败了。 I have created a data type and stored procedure as follows in the Azure Sql;我在Azure Sql中创建了如下数据类型和存储过程;

CREATE TYPE [dbo].[Patch] AS TABLE(
    [BaseKey] int,
    [GISKey] [varchar](10),
    [ActiveFrom] datetime
)
DROP PROC IF EXISTS dbo.spCopyPatch
GO
CREATE PROC dbo.spCopyPatch
@Patch dbo.Patch READONLY,
@BaseKey int,
@GISKey varchar(10),
@ActiveFrom datetime
AS
INSERT INTO dbo.Patch( BaseKey,GISKey,ActiveFrom)
VALUES(@BaseKey,@GISKey,@ActiveFrom);
GO

I then proceeded to edit the copy activity Sink.然后我继续编辑复制活动接收器。 It is able to pick up the Stored Procedure OK;它能够拿起存储过程OK;

在此处输入图像描述

However this fails on debug: Am I getting it right or missing something?然而,这在调试时失败了:我是做对了还是遗漏了什么?

Your help highly appreciated in advance.提前高度感谢您的帮助。

I resolved this and wrote direct from OnPrem SQL Server to Azure SQL Server.我解决了这个问题,并直接从 OnPrem SQL 服务器写入 Azure SQL 服务器。

Step 1. Update Source with the a dataset drawn from the SQL.步骤 1.使用从 SQL 中提取的数据集更新 Source。

在此处输入图像描述

Step 2. Updated My Stored Procedure to what is highlighted in green below步骤 2.将我的存储过程更新为下面以绿色突出显示的内容

在此处输入图像描述

Step 3. Populate Sink in order and shown below步骤 3.按顺序填充 Sink,如下所示

在此处输入图像描述

Debug Copy activity and you have it调试复制活动,你就拥有了

在此处输入图像描述

usually there are 2 ways to data transformations in ADF based on the logic which you see:根据您看到的逻辑,通常有两种方法可以在 ADF 中进行数据转换:

for ELT:对于 ELT:

  1. You copy activity wherein you copy the data from source into destination as is and then use stored procedures activity to trigger stored procedures that do the needed transformations.您复制活动,其中您将数据从源复制到目标,然后使用存储过程活动来触发执行所需转换的存储过程。 SO in your case you can create a table in your sink and via copy activity map the source table to the sink table.所以在你的情况下,你可以在你的接收器中创建一个表,并通过复制活动 map 将源表复制到接收器表。 Then call the stored procedure activity to do your transformations然后调用存储过程活动进行转换

在此处输入图像描述

for ETL:对于 ETL:

  1. There are data flows wherein you can do transformations to your data before loading them into sink在某些数据流中,您可以在将数据加载到接收器之前对其进行转换

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有存储过程的Azure Data Factory复制活动 - Azure Data Factory copy activity with stored procedure Azure 数据工厂复制活动失败将字符串(从 csv)映射到 Azure SQL 表接收器 uniqueidentifier 字段 - Azure Data factory copy activity failed mapping strings (from csv) to Azure SQL table sink uniqueidentifier field 复制活动中调用的存储过程的管道失败-Azure数据工厂V2 - pipeline fails for stored Procedure called in Copy Activity - Azure data factory V2 无法在 Azure 数据工厂的复制活动中向接收器“Azure 数据资源管理器”添加额外的列 - Not able to add additional column to the sink `Azure Data Explorer` in the Copy Activity of Azure Data Factory Azure数据工厂查找活动,具有表类型参数的存储过程 - Azure Data Factory Lookup Activity, Stored Procedure with Table Type parameter 在 DataFlow Azure 数据工厂中的活动后执行参数化存储过程 - Execute parameterized stored procedure after an activity in DataFlow Azure Data Factory 具有存储过程的Azure数据工厂V2副本 - Azure data factory V2 copy with stored procedure Azure数据工厂和存储过程 - Azure data factory and stored procedure Azure 数据工厂 - 复制数据活动接收器 - 每个文件属性的最大行数 - Azure data factory - Copy Data activity Sink - Max rows per file property Azure 数据工厂 - 在接收器端复制数据活动自动表创建时出错不适用于接收器数据集 - Azure data factory - Getting an error in Copy data activity auto table creation in sink side is not applicable for your sink dataset
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM