---
title: reportLatestOffset
description: "DataSourceStreamReader.reportLatestOffset method in PySpark: Returns the most recent offset available."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/datasourcestreamreader/reportLatestOffset
---

# reportLatestOffset

Returns the most recent offset available.

The information is used to report the latest offset in the streaming query status. The source can return `None` if there is no data to process or if the source does not support this method.

## Syntax

```
reportLatestOffset()
```

## Returns

`dict` or `None`

A dict or recursive dict whose key and value are primitive types, which includes Integer, String, and Boolean. Returns `None` if the source does not support reporting the latest offset.

## Examples

```python
def reportLatestOffset(self):
    return {"partition-1": {"index": 100}, "partition-2": {"index": 200}}
```
