azure-functions - Azure Function (REST API for Http Trigger & using Timer Trigger with Azure Data Factory)
问题描述
I am trying to develop an Azure Function and came across a question regards to the requirement for using HTTP Trigger.
I am trying to pull data using a third party's SDK, and it is XML-based web services (XML API), not REST API, so it appears that I cannot use HTTP Trigger.
1) My understanding is, in order to use HTTP Trigger, I need to have REST API, correct? How about XML API?
I am trying to go with Timer Trigger and use Azure Data Factory to pull data.
2) If I use Timer Trigger and Azure Data Factory (ADF), where does data get stored in between?
Is data stored in the storage account (Table or Blob) that I configured when I created Function App, and then when I execute ADF, data would be pulled from there?
And if so, how does data in the storage account gets truncated (for next run) after it is used?
3) I am trying to locate where the logic of pulling data should go within the Function CS file.
I guess I have to call a method from other cs file (ListVendors.cs) inside the Function app solution to list vendors' data, correct?
And the Main class is in another cs (Program.cs) file.
Do I call/put the class name (& method) inside the Function class inside Run method (as shown below)?
Function class (TimerTrigger_1109_1)
ListVendors class
Main method (Program.cs)
I am trying to understand how Function app gets called vs. how Main method is called within Function application.
4) When I run the solution, how does solution know which file to run (Function file or Main method within the solution)? Since this is Function solution, I am not sure how execution of solution works.
Thanks.
解决方案
感谢JaliyaUdagedara对此线程的回答 - Azure Function (REST API for Http Trigger & using Timer Trigger with Azure Data Factory) - Microsoft Q&A
那么,如果我使用 Timer Trigger 并且有一个逻辑来提取数据列表,我该如何将数据移动到 ADF?
据我所知,ADF 不能直接使用 Timer trigger function
.
但您可以先在 Azure 数据工厂中创建 计划触发器:
然后新建一个 Http Trigger Function
,把原来写在里面的逻辑写 Time Trigger Function
进去 Time Trigger Function
。然后使用 ADF 中的 Http 触发功能。
关于如何在 ADF 中使用 azure 功能,可以参考这篇 博客。
推荐阅读
- java - 如何在 Play Framework 控制器中访问 Apache 环境变量?
- android - 在不同包中的活动之间导航
- c# - C#处理EASYMODBUS时Socket是否连接
- android - 如何处理错误:链接引用失败
- javascript - 为什么此代码返回 3 维数组
- c++ - 有没有办法在数学上解决 UVA 417?
- java - Android 广播接收器的问题
- c# - 如何检查奖励广告是否可用?
- angular - 关闭垫子对话框后如何将返回值发送给 CanDeactivate Guard | Angular CanDeactivate Guard | 角度材料对话框
- android - 传输到 GL 线程时,vector3f 中的数据丢失/损坏