This is an automated email from the ASF dual-hosted git repository. csringhofer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 876829951dc23ac044e79c3ed3088207d812d3bb Author: Tamas Mate <[email protected]> AuthorDate: Thu Aug 11 16:43:44 2022 +0200 IMPALA-11483: [DOCS] Document EXPIRE SNAPSHOTS functionality This commit documents the Iceberg expire snapshot functionality. Testing: - Built the docs locally and verified the generated html. Change-Id: Iddd927dd1b6ee3b99dd29982018a610389e64836 Reviewed-on: http://gerrit.cloudera.org:8080/18838 Reviewed-by: Tamas Mate <[email protected]> Tested-by: Tamas Mate <[email protected]> --- docs/topics/impala_iceberg.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/topics/impala_iceberg.xml b/docs/topics/impala_iceberg.xml index 78c865832..1ae133623 100644 --- a/docs/topics/impala_iceberg.xml +++ b/docs/topics/impala_iceberg.xml @@ -506,6 +506,38 @@ CREATE TABLE new_ice_tbl LIKE orig_ice_tbl; </conbody> </concept> + <concept id="iceberg_expire_snapshots"> + <title>Expiring snapshots</title> + <conbody> + <p> + Iceberg snapshots accumulate until they are deleted by a user action. Snapshots + can be deleted with <codeph>ALTER TABLE ... EXECUTE expire_snapshots(...)</codeph> + statement, which will expire snapshots that are older than the specified + timestamp. For example: + <codeblock> +ALTER TABLE ice_tbl EXECUTE expire_snapshots('2022-01-04 10:00:00'); +ALTER TABLE ice_tbl EXECUTE expire_snapshots(now() - interval 5 days); + </codeblock> + </p> + <p> + Expire snapshots: + <ul> + <li>does not remove old metadata files by default.</li> + <li>does not remove orphaned data files.</li> + <li>respects the minimum number of snapshots to keep: + <codeph>history.expire.min-snapshots-to-keep</codeph> table property.</li> + </ul> + </p> + <p> + Old metadata file clean up can be configured with + <codeph>write.metadata.delete-after-commit.enabled=true</codeph> and + <codeph>write.metadata.previous-versions-max</codeph> table properties. This + allows automatic metadata file removal after operations that modify metadata + such as expiring snapshots or inserting data. + </p> + </conbody> + </concept> + <concept id="iceberg_table_properties"> <title>Iceberg table properties</title> <conbody>
