简体   繁体   English

从 Azure Functions 调用 Azure 数据工厂 (V2) 管道

[英]Invoking Azure Data Factory (V2) pipeline from Azure Functions

Requirement: I am trying to invoke a ADFV2 pipeline from Azure Function.要求:我正在尝试从 Azure 函数调用 ADFV2 管道。 The ADFV2 pipeline is already created through .NET api. ADFV2 管道已通过 .NET api 创建。

Problem : Not able to resolve Microsoft.Azure.Management.DataFactory (this one was introduced newly for ADFV2) nuget package where else the nuget package Microsoft.Azure.Management.DataFactories (this one already exists from the timeline of ADFV1) gets successfully accepted.问题:无法解决Microsoft.Azure.Management.DataFactory (这是为 ADFV2 新引入的)nuget 包,而其他 nuget 包Microsoft.Azure.Management.DataFactories (从 ADFV1 的时间线中已经存在)被成功接受.

Error - Unable to resolve 'Microsoft.Azure.Management.DataFactory (>= 0.2.1)' for '.NETFramework,Version=v4.5.2'.错误- 无法解析“.NETFramework,Version=v4.5.2”的“Microsoft.Azure.Management.DataFactory (>= 0.2.1)”。

Why through Azure Function and not Trigger or Custom Activity : The ADFV2 pipeline is dependent on another process (the copy activity source dataset might not be ready when the pipeline will be scheduled to run) which could be achieved by .NET custom activity in ADFV2 itself but thought to try in the other possible way around.为什么通过 Azure 函数而不是触发器或自定义活动:ADFV2 管道依赖于另一个进程(当管道计划运行时,复制活动源数据集可能没有准备好),这可以通过 ADFV2 本身中的 .NET 自定义活动实现但想以另一种可能的方式尝试。

Note : Already went through the link which talks about the same thing only difference being its ADFV1.注意:已经通过链接谈论相同的事情,唯一的区别是它的 ADFV1。

Answering and providing some other information so that others who might get stuck on situations like the above would get benefited.回答并提供一些其他信息,以便其他可能陷入上述情况的人会从中受益。

So, finally was able to invoke ADFV2 pipeline from Azure Functions but for some reason was not able to add Nuget packages( Microsoft.Azure.Management.DataFactory ) by referring them in project.json or using them directly in run.csx .因此,最终能够从Azure Functions调用ADFV2管道,但由于某种原因无法通过在project.json引用它们或直接在run.csx使用它们来添加Nuget包( Microsoft.Azure.Management.DataFactory )。 So, uploaded the dll in bin folder and referred them in my function app as if they were external assemblies which worked fine for my application and was able to invoke all the ADFV2 pipeline related methods (ex: DataFactoryManagementClient , CreateRunWithHttpMessagesAsync etc...).因此,将dll上传到bin文件夹中,并在我的函数应用程序中引用它们,就好像它们是外部程序集一样,对我的应用程序运行良好,并且能够调用所有与ADFV2管道相关的方法(例如: DataFactoryManagementClientCreateRunWithHttpMessagesAsync等...)。

Also, just started working on VS2017 (version 15.6.0 preview 1.0 ) and checked the Cloud -> Azure Functions application where managing the above mentioned Nuget packages is working smoothly.此外,刚刚开始使用VS2017 (版本15.6.0 preview 1.0 )并检查了Cloud -> Azure Functions应用程序,其中管理上述Nuget包运行顺利。

我也试图从azure函数调用管道,但是我做不到,您能帮我吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM