---
title: reader
description: "DataSource.reader method in PySpark: Returns a DataSourceReader instance for reading data."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/datasource/reader
---

# reader

Returns a `DataSourceReader` instance for reading data.

The implementation is required for readable data sources.

## Syntax

```
reader(schema: StructType)
```

## Parameters

| Parameter | Type       | Description                        |
| --------- | ---------- | ---------------------------------- |
| `schema`  | StructType | The schema of the data to be read. |

## Returns

`DataSourceReader`

A reader instance for this data source.
