# Avro File Reader

{% hint style="info" %}
**Avro File Reader** is a Pipeline Engine v2 exclusive connector.
{% endhint %}

The **Avro File Reader** connector allows you to read Avro files.

Avro is a popular data serialization framework used within the Hadoop Big Data ecosystem, which is known for its schema evolution support and compactness. For more information, [see the official website](https://avro.apache.org/).

## **Parameters**

Take a look at the configuration parameters of the connector. Parameters supported by [Double Braces expressions](https://docs.digibee.com/documentation/connectors-and-triggers/double-braces/overview) are marked with `(DB)`.

### **General tab**

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Default value</th><th>Data type</th></tr></thead><tbody><tr><td><strong>File Name</strong> <code>(DB)</code></td><td>The file name of the Avro file to be read.</td><td>{{ message.fileName }}</td><td>String</td></tr><tr><td><strong>Check File Size</strong></td><td>If the option is active, the specified <strong>Maximum File Size</strong> is checked. In case of a higher size, an error will be thrown.</td><td>False</td><td>Boolean</td></tr><tr><td><strong>Maximum File Size</strong></td><td>Specifies the maximum size allowed (in bytes) of the file to be read.</td><td>N/A</td><td>Integer</td></tr><tr><td><strong>Fail On Error</strong></td><td>If the option is active, the execution of the pipeline with an error will be interrupted. Otherwise, the pipeline execution proceeds, but the result will show a false value for the <code>"success"</code> property.</td><td>False</td><td>Boolean</td></tr></tbody></table>

### **Documentation tab**

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Default value</th><th>Data type</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td>Section for documenting any necessary information about the connector configuration and business rules.</td><td>N/A</td><td>String</td></tr></tbody></table>

{% hint style="info" %}
Note that a compressed Avro file produces a JSON content that is larger than the file itself when it’s read. Therefore, it’s important to validate whether the pipeline has enough memory to handle the data, as it will be stored in the pipeline's memory.
{% endhint %}

## **Usage examples**

### **Reading file**

Reading an Avro file without checking the file size:

* **File Name:** file.avro
* **Check File Size:** deactivated

**Output:**

```
{
  "data": [
    {
      "name": "Aquiles",
      "phoneNumbers": [
        "11 99999-9999",
        "11 93333-3333"
      ],
      "active": true,
      "address": "St. Example",
      "score": 71.3,
      "details": "Some details"
    }
  ],
  "fileName": "file.avro",
  "total": 1
}

```

### **Reading file - Checking file size**

Reading an Avro file checking its size being higher than the **Maximum File Size**:

* **File Name:** file.avro
* **Check File Size:** activated
* **Maximum File Size:** 5000000

**Output:**

```
{
  "data": [
    {
      "name": "Aquiles",
      "phoneNumbers": [
        "11 99999-9999",
        "11 93333-3333"
      ],
      "active": true,
      "address": "St. Example",
      "score": 71.3,
      "details": "Some details"
    }
  ],
  "fileName": "file.avro",
  "total": 1
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/connectors/files/avro-file-reader.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
