> For the complete documentation index, see [llms.txt](https://docs.langstack.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.langstack.com/welcome/get-started/learn-langstack/introduction-to-etl-pipeline/data-formats-in-etl-pipeline/reader.md).

# Reader

Records can be read from Langstack Entities or external data sources (using Connectors) through the settings defined in the ETL pipeline>Data Format>Reader tab.

## Data Source as a Connector

If the Data source is a connector:

* Based on the Connector type selected in the Details tab, users can define the reader stream as CSV Stream, Database Stream, JSON Stream, FixedWidth Stream, or Text Stream.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlreadstream.png" alt=""><figcaption></figcaption></figure>

* When the steam is selected, and the relevant settings are defined, the reader fields are copied to the Source fields. Additional fields can be added by clicking the \[+ Field] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlsrcfieldsaddf.png" alt=""><figcaption></figcaption></figure>

* The fields in this section are then aligned with destination fields using Field Mapping. The Reader fields can be all of the fields defined in the source or a few fields depending on the information required.
* Users can define match keys in the Filter Match key section. A match key can be added by clicking the \[+ Match key] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlrdrmtchkey.png" alt=""><figcaption></figcaption></figure>

* The match key is then defined by selecting a field from the data source and the relevant source.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlrdrmtchkeyselfield.png" alt=""><figcaption></figcaption></figure>

## Data Source as an Entity

If the Data source is an entity:

* The Reader tab displays the Source fields as the three columns of the Entity:\_modified\_date, \_created\_date, and \_id.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9rdrentitysrcfields.png" alt=""><figcaption></figcaption></figure>

* The Filter Match key section is displayed with the following fields as per their execution sequence:
  * Order By: Users can define ordering the records as ascending or descending for the match key.
  * Skip: the number of records that are skipped before adding the records to the result.
  * Limit: Users can define the limit for the number of records in the result. This number can be either a constant value or looked up from a variable or a function. If no value is specified, it means there is no limit on the number of records in the results.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlrdrentityfiltmtchkeys.png" alt=""><figcaption></figcaption></figure>

* A match key can be added by clicking the \[+ Match key] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9etlrdrentityaddfiltmtchkey.png" alt=""><figcaption></figcaption></figure>
