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

### Timestamp

```python
class roboto.formats.parquet.timestamp.Timestamp
```

`from roboto.formats.parquet import Timestamp`

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

The timestamp field of a Parquet file, the field holding each row's timestamp. Serves as both a descriptor of that field and as a utility for projecting its values to other time units.

> **Note**
>
> This is not intended as a public API.

**Attributes**

- **Timestamp.column_index** (`int`): The timestamp's position among the file's leaf columns, which is the index of its column chunk in every row group.

- **Timestamp.field** (`pyarrow.Field`)

- **Timestamp.path** (`tuple[str, ...]`): Path components locating the timestamp field in the file's schema, root to leaf, through structs only.

- **Timestamp.unit_hint** (`str | None`): Unit the stored values are recorded in, used when the Arrow type does not carry one.

  Taken from the `Unit` metadata of the timestamp's [`MessagePathRecord`](/reference/python-sdk/roboto/domain/topics/record#roboto.domain.topics.record.MessagePathRecord), or from the read plan's [`unit`](/reference/python-sdk/roboto/experimental/topics/read_plan#roboto.experimental.topics.read_plan.ReadPlanTimestamp.unit). `None` when the unit is unknown.

#### Timestamp.to_epoch_nanoseconds()

```python
def to_epoch_nanoseconds(timestamp: roboto.time.Time) -> int
```

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

**Parameters**

- **timestamp** (`roboto.time.Time`)

**Returns**

- `int`

#### Timestamp.unit()

```python
def unit() -> roboto.time.TimeUnit
```

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

**Returns**

- `roboto.time.TimeUnit`

### TimestampInfo

```python
class roboto.formats.parquet.timestamp.TimestampInfo
```

`from roboto.formats.parquet.timestamp import TimestampInfo`

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

**Attributes**

- **TimestampInfo.end_time** (`int | float | datetime.datetime | None`)
- **TimestampInfo.field** (`pyarrow.Field`)
- **TimestampInfo.start_time** (`int | float | datetime.datetime | None`)
- **TimestampInfo.unit** (`roboto.time.TimeUnit`)

#### TimestampInfo.end_time_ns()

```python
def end_time_ns() -> Optional[int]
```

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

**Returns**

- `Optional[int]`

#### TimestampInfo.start_time_ns()

```python
def start_time_ns() -> Optional[int]
```

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

**Returns**

- `Optional[int]`

### is_timestamp_like()

```python
def roboto.formats.parquet.timestamp.is_timestamp_like(
    arrow_type: pyarrow.DataType,
) -> bool
```

`from roboto.formats.parquet.timestamp import is_timestamp_like`

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

**Parameters**

- **arrow_type** (`pyarrow.DataType`)

**Returns**

- `bool`

### is_timezone_aware()

```python
def roboto.formats.parquet.timestamp.is_timezone_aware(
    arrow_type: pyarrow.DataType,
) -> bool
```

`from roboto.formats.parquet.timestamp import is_timezone_aware`

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

**Parameters**

- **arrow_type** (`pyarrow.DataType`)

**Returns**

- `bool`

### time_unit_from_timestamp_type()

```python
def roboto.formats.parquet.timestamp.time_unit_from_timestamp_type(
    timestamp_type: pyarrow.TimestampType,
) -> roboto.time.TimeUnit
```

`from roboto.formats.parquet.timestamp import time_unit_from_timestamp_type`

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

**Parameters**

- **timestamp_type** (`pyarrow.TimestampType`)

**Returns**

- `roboto.time.TimeUnit`
