Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.formats.parquet.timestamp

Module Contents

Timestamp

class roboto.formats.parquet.timestamp.Timestamp#View Source

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.

Attributes

Timestamp.column_index

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

field pyarrow.Field #

Timestamp.path

path tuple[str, ...] #

Path components locating the timestamp field in the file’s schema, root to leaf, through structs only.

Timestamp.to_epoch_nanoseconds()

to_epoch_nanoseconds(timestamp)#View Source

Parameters

Return type

int

Timestamp.unit()

unit()#View Source

Attributes

Timestamp.unit_hint

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, or from the read plan’s unit. None when the unit is unknown.

TimestampInfo

class roboto.formats.parquet.timestamp.TimestampInfo#View Source

Attributes

TimestampInfo.end_time

end_time int | float | datetime.datetime | None #

TimestampInfo.end_time_ns()

end_time_ns()#View Source

Return type

Optional[int]

Attributes

TimestampInfo.field

field pyarrow.Field #

TimestampInfo.start_time

start_time int | float | datetime.datetime | None #

TimestampInfo.start_time_ns()

start_time_ns()#View Source

Return type

Optional[int]

Attributes

TimestampInfo.unit

is_timestamp_like()

roboto.formats.parquet.timestamp.is_timestamp_like(arrow_type)#View Source

Parameters

arrow_type pyarrow.DataType

Return type

bool

is_timezone_aware()

roboto.formats.parquet.timestamp.is_timezone_aware(arrow_type)#View Source

Parameters

arrow_type pyarrow.DataType

Return type

bool

time_unit_from_timestamp_type()

roboto.formats.parquet.timestamp.time_unit_from_timestamp_type(timestamp_type)#View Source

Parameters

timestamp_type pyarrow.TimestampType

Was this page helpful?