Azure 数据工厂'值不能为空。参数名称:输入'

问题描述 投票:0回答:1

我正在尝试运行从 API 到 Azure SQL 数据库的复制数据活动。管道活动出现错误

ErrorCode=InvalidParameter,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The value of the property 'input' is invalid: 'Value cannot be null.
Parameter name: input'.,Source=,''Type=System.ArgumentNullException,Message=Value cannot be null.
Parameter name: input,Source=Microsoft.DataTransfer.ClientLibrary,

任何代码中都没有名为 input 的参数。不是管道活动,不是数据集,也不是链接的服务。

这是管道代码

{
    "name": "pipeline8",
    "properties": {
        "activities": [
            {
                "name": "Copy data1",
                "type": "Copy",
                "dependsOn": [],
                "policy": {
                    "timeout": "0.12:00:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": false,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "source": {
                        "type": "JsonSource",
                        "storeSettings": {
                            "type": "HttpReadSettings",
                            "requestMethod": "POST",
                            "requestTimeout": ""
                        },
                        "formatSettings": {
                            "type": "JsonReadSettings"
                        }
                    },
                    "sink": {
                        "type": "AzureSqlSink",
                        "writeBehavior": "insert",
                        "sqlWriterUseTableLock": false,
                        "disableMetricsCollection": false
                    },
                    "enableStaging": false
                },
                "inputs": [
                    {
                        "referenceName": "SkyPrepDataset",
                        "type": "DatasetReference",
                        "parameters": {
                            "relativeurl": "get_users?"
                        }
                    }
                ],
                "outputs": [
                    {
                        "referenceName": "AzureSQLDataset",
                        "type": "DatasetReference",
                        "parameters": {
                            "schemaname": "dbo",
                            "tablename": "webuser",
                            "sqlserver": "myserver",
                            "sqldb": "mydb"
                        }
                    }
                ]
            }
        ],
        "folder": {
            "name": "SkyPrep"
        },
        "annotations": []
    }
}

这是源数据集:

{
    "name": "SkyPrepDataset",
    "properties": {
        "linkedServiceName": {
            "referenceName": "SkyPrepHTTPAPI",
            "type": "LinkedServiceReference"
        },
        "parameters": {
            "relativeurl": {
                "type": "string"
            }
        },
        "annotations": [],
        "type": "Json",
        "typeProperties": {
            "location": {
                "type": "HttpServerLocation",
                "relativeUrl": {
                    "value": "@dataset().relativeurl",
                    "type": "Expression"
                }
            }
        },
        "schema": {}
    }
}

这是接收器数据集

{
    "name": "AzureSQLDataset",
    "properties": {
        "linkedServiceName": {
            "referenceName": "AzureSqlDatabase",
            "type": "LinkedServiceReference",
            "parameters": {
                "sqlserver": {
                    "value": "@dataset().sqlserver",
                    "type": "Expression"
                },
                "sqldb": {
                    "value": "@dataset().sqldb",
                    "type": "Expression"
                }
            }
        },
        "parameters": {
            "schemaname": {
                "type": "string"
            },
            "tablename": {
                "type": "string"
            },
            "sqlserver": {
                "type": "string"
            },
            "sqldb": {
                "type": "string"
            }
        },
        "annotations": [],
        "type": "AzureSqlTable",
        "schema": [],
        "typeProperties": {
            "schema": {
                "value": "@dataset().schemaname",
                "type": "Expression"
            },
            "table": {
                "value": "@dataset().tablename",
                "type": "Expression"
            }
        }
    }
}

这是源链接服务

{
    "name": "AzureSqlDatabase",
    "properties": {
        "parameters": {
            "sqlserver": {
                "type": "string"
            },
            "sqldb": {
                "type": "string"
            }
        },
        "annotations": [],
        "type": "AzureSqlDatabase",
        "typeProperties": {
            "server": "@{linkedService().sqlserver}",
            "database": "@{linkedService().sqldb}",
            "encrypt": "mandatory",
            "trustServerCertificate": false,
            "authenticationType": "SystemAssignedManagedIdentity"
        }
    }
}

和接收器链接服务

{
    "name": "SkyPrepHTTPAPI",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "HttpServer",
        "typeProperties": {
            "url": "https://api.skyprep.io/admin/api/",
            "enableServerCertificateValidation": true,
            "authenticationType": "Anonymous",
            "authHeaders": {
                "api_key": {
                    "type": "SecureString",
                    "value": "**********"
                },
                "acct_key": {
                    "type": "SecureString",
                    "value": "**********"
                }
            }
        }
    }
}
azure http azure-data-factory etl
1个回答
0
投票

ErrorCode=InvalidParameter,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=属性'input'的值无效:'值不能为空。 参数名称:input'.,Source=,''Type=System.ArgumentNullException,Message=Value 不能为空。 参数名称:input,Source=Microsoft.DataTransfer.ClientLibrary,

上述错误可能由以下几个原因引起:

  • 在 pipeline/dataset/linkedservice 中创建的参数和 pipeline/dataset/linkedservice 中使用的参数区分大小写。为了避免这个问题,请保持两个位置的参数名称相同
  • 检查动态参数您在管道中传递的参数是否正确并且具有正确的值。
  • 在运行管道之前检查源和接收器连接如果成功或不成功,则进一步在管道中使用它。
© www.soinside.com 2019 - 2024. All rights reserved.