Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document $entries table in Iceberg #24542

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docs/src/main/sphinx/connector/iceberg.md
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,59 @@ The output of the query has the following columns:
- File metrics in human-readable form.
:::

##### `$entries` table

The `$entries` table provides all the table's current manifest entries for both
data and delete files.

To retrieve the information about the entries of the Iceberg table
`test_table`, use the following query:

```
SELECT * FROM "test_table$entries"
```

Abbreviated sample output:
```text
ebyhr marked this conversation as resolved.
Show resolved Hide resolved
status | snapshot_id | sequence_number | file_sequence_number | data_file | readable_metrics |
--------+----------------+-----------------+----------------------+-------------------------------------+------------------------------------------------+
2 | 57897183625154 | 0 | 0 | {"content":0,...,"sort_order_id":0} | {"c1":{"column_size":103,...,"upper_bound":3}} |
```

The output of the query has the following columns:

:::{list-table} Files columns
:widths: 25, 30, 45
:header-rows: 1

* - Name
- Type
- Description
* - `status`
- `INTEGER`
- Numeric status indication to track additions and deletions. Deletes are informational only and
not used in scans:
* `EXISTING(0)`
* `ADDED(1)`
* `DELETED(2)`
* - `snapshot_id`
- `BIGINT`
- The snapshot ID of the reference.
mosabua marked this conversation as resolved.
Show resolved Hide resolved
* - `sequence_number`
- `BIGINT`
- Data sequence number of the file. Inherited when null and status is 1.
* - `file_sequence_number`
- `BIGINT`
- File sequence number indicating when the file was added. Inherited when null
and status is 1.
* - `data_file`
- `ROW`
- Metadata including file path, file format, file size and other information.
* - `readable_metrics`
- `JSON`
- JSON-formatted file metrics such as column size, value count, and others.
:::

##### `$refs` table

The `$refs` table provides information about Iceberg references including
Expand Down
Loading