我正在尝试从函数中传递管道参数,但似乎它仍仅使用默认值。我很好奇我在这里想念的东西。
我已经安装了ADF-2管道。我定义了一个名为 schema 的管道参数。我在查询的复制数据活动中使用该管道参数,例如:
...
FROM @{pipeline().parameters.schema}.CUSTOMERS t2
...
在调试管道时(当我填写正确的值时)一切正常。但是如果我通过这段代码调用管道
var parameters = new Dictionary<string, object>()
{
{"schema", "fi" }
};
var runResponse = await client.Pipelines.CreateRunWithHttpMessagesAsync(
remoteControlConfigurations.InitPipeConfigurations.ResourceGroup,
remoteControlConfigurations.InitPipeConfigurations.DataFactoryName,
remoteControlConfigurations.InitPipeConfigurations.PipelineName,
parameters: parameters);
失败,因为 schema 参数为空:
... 'Invalid object name '.CUSTOMERS' ...
我在这里缺少什么?
答案 0 :(得分:0)
好吧,这个谜团已经解决了。错误地,我没有运行给出的代码,但是没有参数的旧版本。部署了正确的版本后,一切正常。