Table of Contents

Read Blob as stream

Reads the contents of an Azure Blob as a Stream. Prefer using streaming over Read Blob as byte array if possible. Streaming is generally faster and uses less memory, because streaming doesn't require loading the entire blob into memory before you can start working with the data.

img

Example img
This flow iterates through blob files in Azure Blob Storage, checks if the content is inside a CSV file, reads the blob as a stream, and finally reads the CSV file as a stream of records. Used actions: Get Blob info, If and Read Blob as byte array.

Note

If you need to read the file multiple times, for example processing its contents and then sending the file somewhere else (such as to an archive), you MUST use the byte array option instead of streaming because the stream can only read once.

Once you have the blob contents, you must load it using a compatible action in order to make use of the data.

For example, a CSV file can be loaded using the Open CSV file as DataReader, Read CSV file as DataTable, or For each row in CSV file actions. Once loaded, you can start working with the data in the CSV file.

Caution

Trying to load a Stream using an incompatible action will fail.

Returns

Stream

Properties

Name Type Description
Connection Required The Azure Blob container connection. The currently supported options are SAS URI and Connection string + container name.
Dynamic connection Optional A connection dynamically created using the Create Azure Blob container connection action.
Blob name prefix Optional To filter the list of blobs, specify a string for the prefix parameter. Note! The prefix is case sensitive.
Result variable name Required The name of the Flow variable that contains the list of the blob names.