---
sidebar:
  label: roboto.formats.parquet
  order: 2
title: roboto.formats.parquet
---
Fetching and decoding of topic data stored in Parquet files.

[`parquet_file_from_url()`](/docs/reference/python-sdk/roboto/formats/parquet#roboto.formats.parquet.parquet_file_from_url) opens a Parquet file from a signed URL, such as one [`get_signed_url()`](/docs/reference/python-sdk/roboto/domain/files#roboto.domain.files.File.get_signed_url) returns, and reads it over HTTP without writing it to disk. [`open_parquet_file()`](/docs/reference/python-sdk/roboto/formats/parquet#roboto.formats.parquet.open_parquet_file) follows a [`CachePolicy`](/docs/reference/python-sdk/roboto/storage#roboto.storage.CachePolicy) instead: it reads a copy already in the local cache, downloads the file to the cache, or reads it over HTTP. The other functions skip row groups outside a time range, read only the selected fields, and extract each row's timestamp. [`ParquetParser`](/docs/reference/python-sdk/roboto/formats/parquet#roboto.formats.parquet.ParquetParser) reads a local Parquet file's schema and timestamp column, from which [`generate_message_path_requests()`](/docs/reference/python-sdk/roboto/formats/parquet#roboto.formats.parquet.generate_message_path_requests) builds a new topic's message paths. Methods such as [`get_data()`](/docs/reference/python-sdk/roboto/domain/topics#roboto.domain.topics.Topic.get_data) and [`get_data()`](/docs/reference/python-sdk/roboto/domain/topics#roboto.domain.topics.MessagePath.get_data) read Parquet files through this package, and [`create_from_df()`](/docs/reference/python-sdk/roboto/domain/topics#roboto.domain.topics.Topic.create_from_df) stores a DataFrame through it, so most code never calls it. Requires the `roboto[analytics]` extra: `pip install roboto[analytics]`.

## Submodules

- [roboto.formats.parquet.arrow_to_roboto](/docs/reference/python-sdk/roboto/formats/parquet/arrow_to_roboto)
- [roboto.formats.parquet.fetch](/docs/reference/python-sdk/roboto/formats/parquet/fetch)
- [roboto.formats.parquet.parquet_parser](/docs/reference/python-sdk/roboto/formats/parquet/parquet_parser)
- [roboto.formats.parquet.table_transforms](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms)
- [roboto.formats.parquet.timestamp](/docs/reference/python-sdk/roboto/formats/parquet/timestamp)

## Package Contents

- [ParquetParser](/docs/reference/python-sdk/roboto/formats/parquet/parquet_parser#roboto.formats.parquet.parquet_parser.ParquetParser) (class): Reader of a local Parquet file's schema, row groups and timestamp column.

- [Timestamp](/docs/reference/python-sdk/roboto/formats/parquet/timestamp#roboto.formats.parquet.timestamp.Timestamp) (class): Timestamp field of a Parquet file: the field that holds each row's timestamp, and the unit of its values.

- [compute_time_filter_mask()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.compute_time_filter_mask) (function): Build a mask that selects the rows whose timestamps fall in a time range.

- [extract_timestamp_field()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.extract_timestamp_field) (function): Find a Parquet file's timestamp field and describe it as a [`Timestamp`](/docs/reference/python-sdk/roboto/formats/parquet/timestamp#roboto.formats.parquet.timestamp.Timestamp).

- [extract_timestamps()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.extract_timestamps) (function): Return each row's timestamp from `table`, converted to nanoseconds since the Unix epoch.

- [generate_message_path_requests()](/docs/reference/python-sdk/roboto/formats/parquet/arrow_to_roboto#roboto.formats.parquet.arrow_to_roboto.generate_message_path_requests) (function): Yield an [`AddMessagePathRequest`](/docs/reference/python-sdk/roboto/domain/topics/operations#roboto.domain.topics.operations.AddMessagePathRequest) for every field of a Parquet file.

- [narrow_list_nested_fields()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.narrow_list_nested_fields) (function): Narrow the structs inside list columns to the fields requested within them.

- [open_parquet_file()](/docs/reference/python-sdk/roboto/formats/parquet/fetch#roboto.formats.parquet.fetch.open_parquet_file) (function): Open a remote Parquet file from the local cache, a new download to it, or HTTP, as a cache policy selects.

- [parquet_file_from_url()](/docs/reference/python-sdk/roboto/formats/parquet/fetch#roboto.formats.parquet.fetch.parquet_file_from_url) (function): Open a Parquet file from a signed URL, reading it over HTTP without writing it to disk.

- [resolve_columns()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.resolve_columns) (function): Build the column names to pass to `ParquetFile.read_row_group` to read `fields`, without duplicates.

- [select_fields()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.select_fields) (function): Keep only the fields `fields` names, found by walking their path components, in the table's order.

- [should_narrow_list_nested_fields()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.should_narrow_list_nested_fields) (function): Return whether `narrow_list_nested_fields` would change a table read for `fields`.

- [should_read_row_group()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.should_read_row_group) (function): Return whether a Parquet row group may hold rows in a time range, so a reader can skip one that cannot.

- [timestamp_statistics()](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.timestamp_statistics) (function): Return the statistics of the timestamp's column chunk in a row group, or `None` when there are none to use.
