如何在Azure中从BLOB读取文件内容并解析CSV文件? [英] How to read the file content and parse the CSV file from BLOB in Azure?

查看:406
本文介绍了如何在Azure中从BLOB读取文件内容并解析CSV文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将csv文件存储在blob容器中,并尝试以天蓝色的方式从逻辑应用程序读取内容.但是我面临着使该接触和迭代相同的问题.请帮助流程.

I have stored the csv file in blob container and try to read the content from logic app in azure. But i am facing issue to get the contect and iterate the same. Please help with flow.

推荐答案

您可以将逻辑应用程序与Azure Function结合使用以实现它.

You could combine the logic app with Azure Function to implement it.

  1. Blob连接器以获取文件.
  2. 将CSV内容传递给函数并返回JSON
  3. 迭代行值.

关于Azure功能,您可以参考此博客,在此示例中,它具有将csv转换为Json的完整逻辑流程.

And about the Azure Function you could refer to this blog, in this example it has a complete Logic flow to convert csv into Json.

希望这可以为您提供帮助,如果您还有其他问题,请告诉我.

Hope this could help you, if you still have other questions, please let me know.

更新: 我在此博客(源代码)中测试了该功能代码是此处,打击是我的测试页:

Update: I test the function in this blog, the source code is here, blow is my test page:

这是结果页:

我复制了结果以获取完整的输出:

I copied the result to get the complete output:

{
  "fileName": "MyTestCSVFile.csv",
  "rows": [
    {
      "ID": "    1",
      "Name": "Aaron",
      "Score": "99"
    },
    {
      "ID": "    2",
      "Name": "Dave",
      "Score": "55"
    },
    {
      "ID": "    3",
      "Name": "Susy",
      "Score": "77 "
    }
  ]
}

这篇关于如何在Azure中从BLOB读取文件内容并解析CSV文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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