将 json 字符串作为输入然后将这些字符串插入 SQL table 作为 Azure 数据工厂中的输出的存储过程

Stored Procedure to take json string as an input then insert these string into SQL table as output in Azure Data Factory

接上一篇 post:

我正在尝试编写一个存储过程以将 json 字符串作为输入并将该字符串作为 Azure 数据工厂的输出插入到 SQL table 中。这是我的 Azure 数据工厂中的存储过程 activity。我已经编写并保存了我在 Azure SQL 服务器中的存储过程的请求。

这是我的存储过程的开头: 我从这个 post 中得到了一些想法:

这是我从之前的 activity 获取的示例 output.json 文件,获取我的管道的元数据。我基本上需要在这个 json 文件中获取 itemName 的值作为存储过程的输入。

你能帮我如何继续这个存储过程吗?非常感谢您。

如果我是你,我可以读取如下元数据的输出,并将它们传递给 proc 参数。

@activity('Get Metadata1').output.durationInQueue.integrationRuntimeQueue
@activity('Get Metadata1').itemName
@activity('Get Metadata1').itemType
@activity('Get Metadata1').effectiveIntegrationRuntime

过程应该类似于

CREATE PROC XXXXX 
@effectiveIntegrationRuntime int 
,@itemName varchar(100)
,@itemType varchar(100)
,Metadata1').effectiveIntegrationRuntime int 

AS 
INSERT INTO SOMETABLEXXX  VALUES (@effectiveIntegrationRuntime .......)