How to read the file content and parse the CSV file from BLOB in Azure?

99封情书 提交于 2019-12-25 00:56:54

问题


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.


回答1:


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

  1. Blob connector to get the file .
  2. Pass CSV content to function and return JSON
  3. Iterate the row values.

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:

And here is result 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 "
    }
  ]
}


来源:https://stackoverflow.com/questions/54220468/how-to-read-the-file-content-and-parse-the-csv-file-from-blob-in-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!