ftp 到 azure 存储 blob(触发处理) [英] ftp to azure storage blob (triggered processing)

查看:21
本文介绍了ftp 到 azure 存储 blob(触发处理)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将加密文件从 ftp 服务器 传输到 `azure blob storage container

I want to transfert encrypted files from an ftp server to `azure blob storage container

这是有问题的工作流程:

Here is the workfow in question:

CSV Ftp 服务器上的加密文件 ---------->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 output csv 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 触发器 作为第一步,但我无法确定最适合我的情况的第二步.

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.

我看到了很多建议,例如使用网络作业、其他用于 azure 功能和 azure 应用服务...

I saw many suggestiong like using web jobs, others for azure functions and azure app service...

因为我对这些 azure 结构有点陌生,所以我来这里询问最好的方法以及为什么?

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 函数 ?或者只是制作一个 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 文件,输出是 azure 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:

在我的逻辑应用中

  1. 创建 ftp 触发器:当 files 添加 on ftp -> Create a blob on Azure storage & 删除文件 来自 ftp
  2. 创建 Azure 函数

  1. Create ftp trigger : When a files is added on ftp -> Create a blob on Azure storage & Delete file from ftp
  2. Create an Azure function

(下面网格中的 Azure 函数与 Web 作业)

(Azure function vs web jobs in the below grid)

基于blob创建触发器,当blob创建时调用decryption api app.

based on blob creation trigger, when a blob is created call decryption api app.

根据下面的表格,我们可以看出为什么 azure Functions 比我的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆