Azure数据工厂-使用包参数执行SSIS包

时间:2018-08-02 14:43:47

标签: parameters ssis azure-data-factory

我正在尝试使用“执行SSIS包”活动在Azure Data Factory v2中使用参数执行SSIS包。

但是我遇到以下错误:

Activity Execute SSIS Package failed: Failed get parameter info of parameter JobID.

管道设置如下:

{
"name": "Master Load",
"properties": {
    "activities": [
        {
            "name": "Execute SSIS Package",
            "type": "ExecuteSSISPackage",
            "policy": {
                "timeout": "7.00:00:00",
                "retry": 0,
                "retryIntervalInSeconds": 30,
                "secureOutput": false
            },
            "typeProperties": {
                "packageLocation": {
                    "packagePath": "blah/blah/blah.dtsx"
                },
                "loggingLevel": "Basic",
                "environmentPath": "blah/blah",
                "connectVia": {
                    "referenceName": "blah-SSISIR",
                    "type": "IntegrationRuntimeReference"
                },
                "packageParameters": {
                    "JobID": {
                        "value": "@pipeline().parameters.JobID"
                    }
                }
            }
        }
    ],
    "parameters": {
        "JobID": {
            "type": "Int",
            "defaultValue": -1
        }
    },
    "folder": {
        "name": "Master Loads"
    }
},
"type": "Microsoft.DataFactory/factories/pipelines"}

JobID是我拥有的SSIS项目中的一个Project参数。 SSIS 2016,我们将程序包部署到ADFv2 / Azure /任何您想调用的程序。

该软件包成功运行,没有packageParameters部分,仅使用了软件包中的默认值,但我们希望在运行时进行设置。

有人遇到这个问题或有任何要分享的例子吗?

谢谢

1 个答案:

答案 0 :(得分:1)

您声明JobID是一个项目参数,然后应在json中使用Sub Bulky2() ' Sheet Name, Source Range, Date Cell, Weeks List, Days in Week Const cSheet As String = "Monthly Status" Const cCells As String = "K24:K34" Const cDateCell As String = "K36" Const cWeeks As String = "26,26,23,22,20,19,12,11,9,8,6" Const cDays As Long = 7 Dim vntT As Variant ' Target Array Dim vntW As Variant ' Weeks Array Dim RefDate1 As Date ' Date Dim i As Long ' Arrays Row Counter With Sheets(cSheet) RefDate1 = .Range(cDateCell).Value If RefDate1 = False Then .Range(cCells).ClearContents Else vntW = Split(cWeeks, ",") ReDim vntT(1 To UBound(vntW) + 1, 1 To 1) For i = 1 To UBound(vntT) vntT(i, 1) = RefDate1 - (cDays * CLng(Trim(vntW(i - 1)))) Next .Range(cCells) = vntT End If End With End Sub 而不是projectParameters