问题
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.
- Blob connector to get the file .
- Pass CSV content to function and return JSON
- 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