ftp到azure存储blob(触发处理) [英] ftp to azure storage blob (triggered processing)
问题描述
我想将加密的文件从ftp server
传输到"azure blob存储容器"
I want to transfert encrypted files from an ftp server
to `azure blob storage container
这是有问题的工作流:
Ftp服务器上的
CSV
加密文件---------->Trigger
(例如:添加文件时)---------->拨电至 一些处理解密的本地程序或api 然后在Blob容器中创建输出csv
文件
CSV
encrypted files on Ftp server ---------->Trigger
(example: On adding files)----------> call to some local programs or api that process decryption and then create the outputcsv
file in the blob container
文件的结构如下:
Input CSV file:
column1;column2;column3;
encryptedvalue1;encryptedvalue2;encryptedvalue3;
和
Output csv file:
column1;column2;column3;
value1;value2;value3;
这里没有文件内容转换,但是还有一件事我不知道它是否可行:
There is no file content transformation here but there is one more thing that i don't know if its doable or not:
例如,我想根据column1的值将新的blob添加到特定的文件夹下. (例如,通过代码管理Blob容器的层次结构)
I want to add the new blob under a specific folder depending of column1 value for example. (e.g. manage hierarchy of blob container from code)
我试图创建一个Logic App
并创建了ftp trigger
作为第一步,但是我无法确定最适合作为我的情况的第二步.
I tried to create a Logic App
and created the ftp trigger
as first step, but i couldn't figure out what fits best as second step in my case.
我看到了很多建议,例如使用Web作业,其他建议用于azure功能和azure应用程序服务...
I saw many suggestiong like using web jobs, others for azure functions and azure app service...
由于这些天蓝色结构是一种新事物,所以我来这里询问这样做的最佳方法以及为什么?
And because am kind of new to these structures of azure i came here to ask about the best way to do so and why ?
使用Web Job
更好吗?还是azure function
?还是只做一个HttpRequest
?那为什么呢?
Is it better to use Web Job
? or azure function
? or just make an HttpRequest
? and why is that ?
我已经采用正确的方法了吗? logic app
是允许我这样做的最好方法吗?
Am i already on the right way of doing this? is the logic app
the best way that allows me to do so ?
注意:编辑
文件大小大约为Mb(不是很大),CSV
文件带有;"作为分隔符
输入是ftp服务器上的csv
文件,输出是在天蓝色blob存储上特定文件夹"下的解密的csv文件
files sizes are around some Mb (not very big sizes) CSV
files with ";" as seperator
the input is csv
file on ftp server and the output is decrypted csv file under specific "folder" on azure blob storage
任何帮助将不胜感激
推荐答案
经过一些研究,并基于evilSnobu
的答案和Johns-305
的注释,我发现执行此操作的最佳方法如下...
After some researches and based on the answer of evilSnobu
and the comments of Johns-305
, i figured out that the best way to do this is like following...
注意:我开发了一个Azure Api App
来进行内容解密
note: I have an Azure Api App
developed to do content decryption
基于此网格,最好的选择显然是用于设计我的工作流程的逻辑应用程序:
Based on this grid, the best choice here is obviously logic apps to design my workflow:
在我的逻辑应用程序内部
Inside my Logic App
- 创建ftp触发器:当ftp上的
files is added
->来自ftp的Azure存储&
Delete file
上的Create a blob
时 -
创建
Azure function
- Create ftp trigger : When a
files is added
on ftp ->Create a blob
on Azure storage&
Delete file
from ftp Create an
Azure function
(Azure功能与下面网格中的Web作业)
(Azure function vs web jobs in the below grid)
基于blob creation trigger
,在创建Blob时调用解密API应用.
based on blob creation trigger
, when a blob is created call decryption api app.
根据下面的网格,我们可以判断为什么在我的情况下,天蓝色函数比Web作业更适合
And based on the following grid, we can tell why azure Functions fit better than web jobs in my case
最后,总结一下,我可以说,就我而言,我需要对我的解决方案有一个开发人员的看法,因此这就是为什么我主要需要逻辑应用程序的原因,然后我必须执行两个基本任务,这些任务是触发的基于非连续性,因此更适合Azure Functions
和便宜(因为文件不大,处理速度很快)
Finally, summarize this, i can say that in my case, i need to have a developer view of my solutions so that's why i needed the logic app mainly, then i have to do two elementary tasks which are trigger based not continious so that's better suited to Azure Functions
and a lot cheaper (since files are not big and processing will be very quick)
这篇关于ftp到azure存储blob(触发处理)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!