---
sidebar:
  label: roboto.formats.fields
  order: 0
title: roboto.formats.fields
---
## Module Contents

### FieldSelection

```python
class roboto.formats.fields.FieldSelection
```

`from roboto.formats import FieldSelection`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/formats/fields.py#L13-L26)

A field to read out of a data file, identified by its path through the file's schema.

The MCAP and Parquet readers in [`roboto.formats`](/docs/reference/python-sdk/roboto/formats), such as [`McapReader`](/docs/reference/python-sdk/roboto/formats/mcap/reader#roboto.formats.mcap.reader.McapReader) and [`select_fields()`](/docs/reference/python-sdk/roboto/formats/parquet/table_transforms#roboto.formats.parquet.table_transforms.select_fields), take the fields to read as `FieldSelection` values. [`to_field_selection()`](/docs/reference/python-sdk/roboto/domain/topics/record#roboto.domain.topics.record.MessagePathRecord.to_field_selection) converts a topic's message path into one.

**Attributes**

- **FieldSelection.path_in_schema** (`tuple[str, ...]`): Components of the field's path through the file's schema, from root to leaf.

  A component may contain dots, so `("header", "stamp")` (a `stamp` field nested in a `header` struct) and `("header.stamp",)` (a top-level column named `header.stamp`) are different fields.
