You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/cli.md
+37-13Lines changed: 37 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,19 +43,20 @@ Options:
43
43
--help Show this message and exit.
44
44
45
45
Commands:
46
-
create Operation to create a namespace.
47
-
describe Describe a namespace or a table.
48
-
drop Operations to drop a namespace or table.
49
-
files List all the files of the table.
50
-
list List tables or namespaces.
51
-
list-refs List all the refs in the provided table.
52
-
location Return the location of the table.
53
-
properties Properties on tables/namespaces.
54
-
rename Rename a table.
55
-
schema Get the schema of the table.
56
-
spec Return the partition spec of the table.
57
-
uuid Return the UUID of the table.
58
-
version Print pyiceberg version.
46
+
create Operation to create a namespace.
47
+
describe Describe a namespace or a table.
48
+
drop Operations to drop a namespace or table.
49
+
expire-snapshots Expire snapshots from a table by ID or age.
50
+
files List all the files of the table.
51
+
list List tables or namespaces.
52
+
list-refs List all the refs in the provided table.
53
+
location Return the location of the table.
54
+
properties Properties on tables/namespaces.
55
+
rename Rename a table.
56
+
schema Get the schema of the table.
57
+
spec Return the partition spec of the table.
58
+
uuid Return the UUID of the table.
59
+
version Print pyiceberg version.
59
60
```
60
61
61
62
This example assumes that you have a default catalog set. If you want to load another catalog, for example, the rest example above. Then you need to set `--catalog rest`.
@@ -240,3 +241,26 @@ Property write.metadata.delete-after-commit.enabled removed from nyc.taxis
240
241
➜ pyiceberg properties get table nyc.taxis write.metadata.delete-after-commit.enabled
241
242
Could not find property write.metadata.delete-after-commit.enabled on nyc.taxis
242
243
```
244
+
245
+
## Expire snapshots
246
+
247
+
`expire-snapshots` removes snapshots from a table. Snapshots that are the HEAD of a branch or that are referenced by a tag are protected and will be skipped.
248
+
249
+
Pass `--snapshot-id` one or more times to expire snapshots by ID, and/or `--older-than <ISO datetime>` to expire all unprotected snapshots older than the given timestamp. At least one of the two options is required.
0 commit comments