【问题标题】:Azure Data Factory with SP Activity - Debug and Publish fails具有 SP 活动的 Azure 数据工厂 - 调试和发布失败
【发布时间】:2022-08-03 14:46:19
【问题描述】:

我创建了一个 Azure 数据工厂管道,其中包含一个简单的存储过程活动,该活动应该从 Azure SQL DB 中的存储过程中获取数据。存储过程接受一个输入参数。我已经发布了这些更改。

当我单击Validate 时,我收到以下错误,我几乎没有得到任何信息:

{
  \"code\": \"BadRequest\",
  \"message\": null,
  \"target\": \"pipeline//runid/dcb92f70-0a4b-4be1-943b-5ggn68365tyc\",
  \"details\": null,
  \"error\": null
} 

当我点击Trigger now 时,它只是说“运行管道失败”,没有更多细节。

我的管道 JSON 如下所示:

{
    \"name\": \"GetPopulationRecordsForAnalysis\",
    \"properties\": {
        \"description\": \"Gets Population Records\",
        \"activities\": [
            {
                \"name\": \"GetPopulationRecords\",
                \"type\": \"SqlServerStoredProcedure\",
                \"dependsOn\": [],
                \"policy\": {
                    \"timeout\": \"7.00:00:00\",
                    \"retry\": 0,
                    \"retryIntervalInSeconds\": 30,
                    \"secureOutput\": false,
                    \"secureInput\": false
                },
                \"userProperties\": [],
                \"typeProperties\": {
                    \"storedProcedureName\": \"[dbo].[usp_GetPopulationRecords]\",
                    \"storedProcedureParameters\": {
                        \"@countryID\": {
                            \"value\": \"48\",
                            \"type\": \"Int64\"
                        }
                    }
                },
                \"linkedServiceName\": {
                    \"referenceName\": \"AzureSqlLinkedService\",
                    \"type\": \"LinkedServiceReference\"
                }
            }
        ],
        \"annotations\": [],
        \"lastPublishTime\": \"2022-08-02T13:37:27Z\"
    },
    \"type\": \"Microsoft.DataFactory/factories/pipelines\"
}

我在这里做错了什么?

    标签: azure azure-data-factory azure-data-factory-2


    【解决方案1】:

    我现在已经弄清楚了这个问题。我犯的第一个错误是我给出了带有架构的完整 SP 名称,'['character 和所有 usp_GetPopulationRecords 工作得很好。其次,我在输入参数之前添加了一个额外的'@' 字符,就像我们在 SQL Server 中运行时所做的那样。这里不需要,只有 countryID 可以正常工作。希望我的回答有帮助。

    【讨论】:

      猜你喜欢
      • 2018-11-25
      • 2017-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-11
      • 1970-01-01
      相关资源
      最近更新 更多