---
sidebar:
  hidden: true
title: roboto.domain.topics.parquet.parquet_topic_reader
---
## Module Contents

### OUTFILE_NAME_PATTERN

```python
roboto.domain.topics.parquet.parquet_topic_reader.OUTFILE_NAME_PATTERN = '{repr_id}_{file_id}.parquet'
```

`from roboto.domain.topics.parquet.parquet_topic_reader import OUTFILE_NAME_PATTERN`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L55-L55)

Filename template for locally cached Parquet files.

### ParquetTopicReader

```python
class roboto.domain.topics.parquet.parquet_topic_reader.ParquetTopicReader(
    roboto_client: roboto.http.RobotoClient,
    cache_dir: Optional[pathlib.Path] = None,
)
```

`from roboto.domain.topics.parquet import ParquetTopicReader`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L68-L387)

Bases: [`roboto.domain.topics.topic_reader.TopicReader`](/reference/python-sdk/roboto/domain/topics/topic_reader#roboto.domain.topics.topic_reader.TopicReader)

Private interface for retrieving topic data stored in Parquet files.

> **Note**
>
> This is not intended as a public API. To access topic data, prefer the `get_data` or `get_data_as_df` methods on [`Topic`](/reference/python-sdk/roboto/domain/topics/topic#roboto.domain.topics.topic.Topic), [`MessagePath`](/reference/python-sdk/roboto/domain/topics/message_path#roboto.domain.topics.message_path.MessagePath), or [`Event`](/reference/python-sdk/roboto/domain/events/event#roboto.domain.events.event.Event).

**Parameters**

- **roboto_client** (`roboto.http.RobotoClient`)
- **cache_dir** (`Optional[pathlib.Path]`)

#### ParquetTopicReader.accepts()

```python
@staticmethod
def accepts(
    message_paths_to_representations: collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping],
) -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L82-L88)

**Parameters**

- **message_paths_to_representations** (`collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping]`)

**Returns**

- `bool`

#### ParquetTopicReader.get_data()

```python
def get_data(
    message_paths_to_representations: collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping],
    start_time: Optional[int] = None,
    end_time: Optional[int] = None,
    timestamp_message_path_representation_mapping: Optional[roboto.domain.topics.record.MessagePathRepresentationMapping] = None,
) -> collections.abc.Generator[tuple[roboto.domain.topics.topic_reader.Timestamp, dict[str, Any]], None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L98-L150)

**Parameters**

- **message_paths_to_representations** (`collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping]`)
- **start_time** (`Optional[int]`)
- **end_time** (`Optional[int]`)
- **timestamp_message_path_representation_mapping** (`Optional[roboto.domain.topics.record.MessagePathRepresentationMapping]`)

**Returns**

- `collections.abc.Generator[tuple[roboto.domain.topics.topic_reader.Timestamp, dict[str, Any]], None, None]`

#### ParquetTopicReader.get_data_as_df()

```python
def get_data_as_df(
    message_paths_to_representations: collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping],
    start_time: Optional[int] = None,
    end_time: Optional[int] = None,
    timestamp_message_path_representation_mapping: Optional[roboto.domain.topics.record.MessagePathRepresentationMapping] = None,
) -> tuple[pandas.Series, pandas.DataFrame]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L152-L211)

**Parameters**

- **message_paths_to_representations** (`collections.abc.Iterable[roboto.domain.topics.record.MessagePathRepresentationMapping]`)
- **start_time** (`Optional[int]`)
- **end_time** (`Optional[int]`)
- **timestamp_message_path_representation_mapping** (`Optional[roboto.domain.topics.record.MessagePathRepresentationMapping]`)

**Returns**

- `tuple[pandas.Series, pandas.DataFrame]`

### logger

```python
roboto.domain.topics.parquet.parquet_topic_reader.logger
```

`from roboto.domain.topics.parquet.parquet_topic_reader import logger`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/parquet/parquet_topic_reader.py#L53-L53)
