Repository navigation
Docs: Document incremental append scans #4524
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2341,6 +2341,28 @@ DataFrame() | |
| +---+---+ | ||
| ``` | ||
|
|
||
| ## Incremental append scan | ||
|
|
||
| `incremental_append_scan()` reads only the rows appended to a table between two snapshots: | ||
|
|
||
| ```python | ||
| tbl.incremental_append_scan( | ||
| from_snapshot_id_exclusive=from_snapshot_id, | ||
| to_snapshot_id_inclusive=to_snapshot_id, | ||
| ).to_arrow() | ||
| ``` | ||
|
|
||
| Both bounds are optional. Without a start, the scan reads from the beginning of the table's history, and without an end, up to the current snapshot. The start must be an earlier snapshot in the end snapshot's history, or a `ValueError` is raised. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A few things about this paragraph:
|
||
|
|
||
| It takes the same filtering and projection arguments, and has the same output methods, as [`scan()`](#query-the-data). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't quite the same as
Could we narrow the sentence to the methods it supports ( |
||
|
|
||
| <!-- prettier-ignore-start --> | ||
|
|
||
| !!! warning "Only appends are read" | ||
| Only `append` snapshots, such as those committed by `append()` and `add_files()`, are read. Other snapshots are skipped, including any rows they add. Deletes aren't reported, so a row that was deleted after it was appended is still returned, and after an `upsert()` an updated row can be returned with both its old and its new values. | ||
|
|
||
| <!-- prettier-ignore-end --> | ||
|
|
||
| ## Type mapping | ||
|
|
||
| ### PyArrow | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it might be worth mentioning the builder methods too, especially
from_snapshot_id_inclusive(), since the keyword arguments only offer an exclusive start: