> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-pipeline/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/getting-started/homepage/create-job/task-components/readers/s3-reader.md).

# S3 Reader

This task reads the file from Amazon S3 bucket.

**Please follow the below mentioned steps to configure meta information of S3 reader task:**

<figure><img src="https://363587200-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fuq3RSHHup7fjHYaspk7y%2Fuploads%2F2cjzrK3v4pJ46f88pHw7%2Fimage.png?alt=media&amp;token=d05c1f75-b020-43c4-9040-58d6f23beab9" alt=""><figcaption><p>S3 Reader</p></figcaption></figure>

### Configuration fields when ***SNS Monitor is disabled***

* **Bucket Name (\*): Enter S3 bucket name.**
* **Region (\*):** Provide the S3 regoin.
* **Access Key (\*):** Access key shared by AWS to login..
* **Secret Key (\*):** Secret key shared by AWS to login
* **Table (\*):** Mention the Table or object name which is to be read
* **File Type (\*):** Select a file type from the drop-down menu (CSV, JSON, PARQUET, AVRO, XML are the supported file types)
* **Limit:** Set a limit for the number of records.
* **Query:** Insert an SQL query (it supports query containing a join statement as well)​.

### **Configuration fields when SNS Monitor is enabled**

* **Access Key (\*):** Access key shared by AWS to login
* **Secret Key (\*):** Secret key shared by AWS to login
* **Table (\*):** Mention the Table or object name which has to be read
* **File Type (\*):** Select a file type from the drop-down menu (***CSV, JSON, PARQUET, AVRO, XML*** are the supported file types)
* **Limit:** Set limit for the number of records
* **Query:** Insert an SQL query (it supports query containing a join statement as well)

### **Partition Columns**

Provide a unique Key column name to partition data in Spark.

{% hint style="info" %}
*<mark style="color:green;">**Please Note:**</mark>* Once file type is selected the multiple fields will appear. Follow the below steps for the selected different file types.

* ***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
    {% endhint %}
