---
sidebar:
  hidden: true
title: roboto.formats.parquet.parquet_parser
---
## Module Contents

### ParquetParser

```python
class roboto.formats.parquet.parquet_parser.ParquetParser(
    source: pathlib.Path,
    min_required_row_group_size: int = 100000,
    small_row_group_count_threshold: int = 32,
)
```

`from roboto.formats.parquet import ParquetParser`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L35-L289)

**Parameters**

- **source** (`pathlib.Path`)
- **min_required_row_group_size** (`int`)
- **small_row_group_count_threshold** (`int`)

**Properties**

- **ParquetParser.column_count** (`int`)
- **ParquetParser.fields** (`Generator[pyarrow.Field, None, None]`)
- **ParquetParser.row_count** (`int`)
- **ParquetParser.row_group_count** (`int`)
- **ParquetParser.row_group_size** (`int`)

#### ParquetParser.extract_timestamp_info()

```python
def extract_timestamp_info(
    timestamp_column_name: Optional[str] = None,
    timestamp_unit: Optional[Union[str, roboto.time.TimeUnit]] = None,
) -> roboto.formats.parquet.timestamp.TimestampInfo
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L113-L172)

**Parameters**

- **timestamp_column_name** (`Optional[str]`)
- **timestamp_unit** (`Optional[Union[str, roboto.time.TimeUnit]]`)

**Returns**

- `roboto.formats.parquet.timestamp.TimestampInfo`

#### ParquetParser.find_timestamp_field_by_type()

```python
def find_timestamp_field_by_type() -> pyarrow.Field
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L94-L111)

**Returns**

- `pyarrow.Field`

#### ParquetParser.get_data_for_column()

```python
def get_data_for_column(column_name: str) -> pyarrow.Table
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L174-L175)

**Parameters**

- **column_name** (`str`)

**Returns**

- `pyarrow.Table`

#### ParquetParser.get_timestamp_field_by_name()

```python
def get_timestamp_field_by_name(column_name: str) -> pyarrow.Field
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L177-L200)

**Parameters**

- **column_name** (`str`)

**Returns**

- `pyarrow.Field`

#### ParquetParser.is_parquet_file()

```python
@staticmethod
def is_parquet_file(path: pathlib.Path) -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L42-L49)

**Parameters**

- **path** (`pathlib.Path`)

**Returns**

- `bool`

#### ParquetParser.requires_rewrite()

```python
def requires_rewrite(timestamp: roboto.formats.parquet.timestamp.TimestampInfo) -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L202-L228)

**Parameters**

- **timestamp** (`roboto.formats.parquet.timestamp.TimestampInfo`)

**Returns**

- `bool`

#### ParquetParser.rewrite()

```python
def rewrite(
    outfile: pathlib.Path,
    timestamp: roboto.formats.parquet.timestamp.TimestampInfo,
    target_row_group_size_bytes: int = 100 * 1000 * 1000,
) -> None
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L230-L278)

**Parameters**

- **outfile** (`pathlib.Path`)
- **timestamp** (`roboto.formats.parquet.timestamp.TimestampInfo`)
- **target_row_group_size_bytes** (`int`)

**Returns**

- `None`

### logger

```python
roboto.formats.parquet.parquet_parser.logger
```

`from roboto.formats.parquet.parquet_parser import logger`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/parquet/parquet_parser.py#L32-L32)
