> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-pipeline-4/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/data-pipeline-4/getting-started/homepage/create/creating-a-new-job/task-components/readers/azure-blob-reader.md).

# Azure Blob Reader

This task is used to read data from Azure blob container.

## Configuring the Meta Information tab fields <a href="#configuring-the-over-all-meta-information-tab-fields" id="configuring-the-over-all-meta-information-tab-fields"></a>

Drag the Azure Blob reader task to the Workspace and click on it to open the related configuration tabs for the same. The ***Meta Information*** tab opens by default.

<figure><img src="https://3157314867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvmyGSlDvDj86v7eh3RHM%2Fuploads%2FgHlT0y4Tq3RAWW9XgorL%2Fimage.png?alt=media&amp;token=76199c8b-690f-40f9-b6fb-4bf1580a1c07" alt=""><figcaption><p><em>Azure Blob Reader Task</em></p></figcaption></figure>

* **Read using:** There are three(3) options available under this tab:
  1. [**Shared Access Signature**](#read-using-shared-access-signature)
  2. [**Secret Key**](#read-using-secret-key-option)
  3. [**Principal Secret** ](#read-using-principal-secret)

### Read using **Shared Access Signature**

**Provide the following details:**

1. **Shared Access Signature:** This is a URI that grants restricted access rights to Azure Storage resources.
2. **Account Name:** Provide the Azure account name.
3. **Container:** Provide the container name from where the file is located and which has to be read.
4. **File type:** There are four(5) types of file extensions are available under it:
   * ***CSV:*** The ***Header*** and ***Infer Schema*** fields get displayed with ***CSV*** as the selected File Type. Enable ***Header*** option to get the Header of the reading file and enable Infer Schema option to get true schema of the column in the CSV file.  &#x20;
   * ***JSON***: The **Multiline** and **Charset** fields get displayed with ***JSON*** as the selected File Type. Check-in the **Multiline** option if there is any multiline string in the file.
   * ***PARQUET***: No extra field gets displayed with PARQUET as the selected File Type.
   * ***AVRO***: This File Type provides two drop-down menus.
     * ***Compression***: Select an option out of the ***Deflate*** and ***Snappy*** options.
     * ***Compression Level***: This field appears for the Deflate compression option. It provides **0** to **9** levels via a drop-down menu.
   * ***XML:*** Select this option to read XML file. If this option is selected, the following fields will get displayed:
     * **Infer schema:** Enable this option to get true schema of the column.
     * **Path:** Provide the path of the file.
     * **Root Tag:** Provide the root tag from the XML files.
     * **Row Tags:** Provide the row tags from the XML files.
     * **Join Row Tags:** Enable this option to join multiple row tags.
5. **Path:** This option will appear once the file type is selected. Enter the path where the selected file type is located.
6. **Read Directory:** Check in this box to read the specified directory.&#x20;
7. **Query:** Provide Spark SQL query in this field.

<figure><img src="https://3157314867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvmyGSlDvDj86v7eh3RHM%2Fuploads%2FxATl4ACGabkeF3OxzCOd%2Fimage.png?alt=media&amp;token=587b522b-da03-4dcf-840c-1b9b322f1b65" alt=""><figcaption><p><em><strong>Reading the Task using the Shared Access Signature</strong></em></p></figcaption></figure>

### Read using Secret Key Option

Provide the following details:

* **Account Key:** Enter the Azure account key. In Azure, an account key is a security credential that is used to authenticate access to storage resources, such as blobs, files, queues, or tables, in an Azure storage account.
* **Account Name:** Provide the Azure account name.
* **Container:** Provide the container name from where the blob is located.\
  A container is a logical unit of storage in Azure Blob Storage that can hold blobs. It is similar to a directory or folder in a file system, and it can be used to organize and manage blobs.
* **File type:** There are four(5) types of file extensions are available under it:
  * ***CSV:*** The ***Header*** and ***Infer Schema*** fields get displayed with ***CSV*** as the selected File Type. Enable ***Header*** option to get the Header of the reading file and enable Infer Schema option to get true schema of the column in the CSV file.  &#x20;
  * ***JSON***: The **Multiline** and **Charset** fields get displayed with ***JSON*** as the selected File Type. Check-in the **Multiline** option if there is any multiline string in the file.
  * ***PARQUET***: No extra field gets displayed with PARQUET as the selected File Type.
  * ***AVRO***: This File Type provides two drop-down menus.
    * ***Compression***: Select an option out of the ***Deflate*** and ***Snappy*** options.
    * ***Compression Level***: This field appears for the Deflate compression option. It provides **0** to **9** levels via a drop-down menu.
  * ***XML:*** Select this option to read XML file. If this option is selected, the following fields will get displayed:
    * **Infer schema:** Enable this option to get true schema of the column.
    * **Path:** Provide the path of the file.
    * **Root Tag:** Provide the root tag from the XML files.
    * **Row Tags:** Provide the row tags from the XML files.
    * **Join Row Tags:** Enable this option to join multiple row tags.
* **Path:** This option will appear once the file type is selected. Enter the path where the selected file type is located.
* **Read Directory:** Check in this box to read the specified directory.&#x20;
* **Query:** Provide Spark SQL query in this field.

<figure><img src="https://3157314867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvmyGSlDvDj86v7eh3RHM%2Fuploads%2FyMXibfXNZWb9V5GShyY5%2Fimage.png?alt=media&amp;token=97b6d835-5097-45b9-bed5-8a01030b5001" alt=""><figcaption><p><em><strong>Reading the Task using the Secret Key</strong></em></p></figcaption></figure>

### Read using Principal Secret

**Provide the following details:**

* **Client ID:** Provide Azure Client ID.\
  The client ID is the unique Application (client) ID assigned to your app by Azure AD when the app was registered.
* **Tenant ID:** Provide the Azure Tenant ID.\
  Tenant ID (also known as Directory ID) is a unique identifier that is assigned to an Azure AD tenant, which represents an organization or a developer account. It is used to identify the organization or developer account that the application is associated with.
* **Client Secret:** Enter the Azure Client Secret.\
  Client Secret (also known as Application Secret or App Secret) is a secure password or key that is used to authenticate an application to Azure AD.
* **Account Name:** Provide the Azure account name.
* **Container:** Provide the container name from where the blob is located.\
  A container is a logical unit of storage in Azure Blob Storage that can hold blobs. It is similar to a directory or folder in a file system, and it can be used to organize and manage blobs.
* **Query:** Provide Spark SQL query in this field.
* **File type:** There are four(5) types of file extensions are available under it:
  * ***CSV:*** The ***Header*** and ***Infer Schema*** fields get displayed with ***CSV*** as the selected File Type. Enable ***Header*** option to get the Header of the reading file and enable Infer Schema option to get true schema of the column in the CSV file.  &#x20;
  * ***JSON***: The **Multiline** and **Charset** fields get displayed with ***JSON*** as the selected File Type. Check-in the **Multiline** option if there is any multiline string in the file.
  * ***PARQUET***: No extra field gets displayed with PARQUET as the selected File Type.
  * ***AVRO***: This File Type provides two drop-down menus.
    * ***Compression***: Select an option out of the ***Deflate*** and ***Snappy*** options.
    * ***Compression Level***: This field appears for the Deflate compression option. It provides **0** to **9** levels via a drop-down menu.
  * ***XML:*** Select this option to read XML file. If this option is selected, the following fields will get displayed:
    * **Infer schema:** Enable this option to get true schema of the column.
    * **Path:** Provide the path of the file.
    * **Root Tag:** Provide the root tag from the XML files.
    * **Row Tags:** Provide the row tags from the XML files.
    * **Join Row Tags:** Enable this option to join multiple row tags.

<figure><img src="https://3157314867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvmyGSlDvDj86v7eh3RHM%2Fuploads%2FFOATUHSWSdYdsy8qfUeX%2Fimage.png?alt=media&amp;token=eba5bde1-e1ca-4a3a-bc5e-9ee3a0605652" alt=""><figcaption><p><em><strong>Reading using the Principal Secret</strong></em></p></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> Please click the **Save Task In Storage** icon to save the configuration for the dragged reader task.*
{% endhint %}
