Reading CSV data using activity functions
In this recipe, we'll retrieve all the data from specific CSV sheets by writing an activity function.
Let's now make some code changes to the orchestration function by writing a new activity function that can read data from a CSV sheet located in the blob container. In this recipe, we'll create an activity trigger named ReadCSV_AT
that reads the data from the blob stored in the storage account. This activity trigger performs the following jobs:
- It connects to the blob using a function,
ReadBlob
, of a class namedStorageManager
. - It returns the data from the CSV file as a collection of employee objects.
Getting ready
Install the following NuGet package in the CSVImport.DurableFunctions
project:
Install-Package Microsoft.Azure.Storage.blob
How to do it...
If you think of Durable Functions as a workflow, then the activity trigger function can be treated as a workflow step that takes some kind of...