From 84e526f24140ee77d412e1a4b2736fc0c93a070f Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Mon, 31 Jul 2023 22:43:04 +0800 Subject: [PATCH] Docs: Fix identifiers and links of branching (#8165) --- docs/branching-and-tagging.md | 2 +- docs/flink-getting-started.md | 2 +- docs/flink-writes.md | 2 +- docs/spark-ddl.md | 14 +++++++------- docs/spark-writes.md | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/branching-and-tagging.md b/docs/branching-and-tagging.md index 6e1a4529f47f..dd70d6c45aab 100644 --- a/docs/branching-and-tagging.md +++ b/docs/branching-and-tagging.md @@ -115,7 +115,7 @@ table.manageSnapshots().fastForward("main", "audit-branch").commit() Creating, querying and writing to branches and tags are supported in the Iceberg Java library, and in Spark and Flink engine integrations. -- [Iceberg Java Library](../../java-api-quickstart/#branching-and-tagging) +- [Iceberg Java Library](../java-api-quickstart/#branching-and-tagging) - [Spark DDLs](../spark-ddl/#branching-and-tagging-ddl) - [Spark Reads](../spark-queries/#time-travel) - [Spark Branch Writes](../spark-writes/#writing-to-branches) diff --git a/docs/flink-getting-started.md b/docs/flink-getting-started.md index 6a229b7d864f..1a9d9b4cd2ec 100644 --- a/docs/flink-getting-started.md +++ b/docs/flink-getting-started.md @@ -274,7 +274,7 @@ env.execute("Test Iceberg DataStream"); ### Branch Writes Writing to branches in Iceberg tables is also supported via the `toBranch` API in `FlinkSink` -For more information on branches please refer to [branches](../../tables/branching). +For more information on branches please refer to [branches](../tables/branching). ```java FlinkSink.forRowData(input) .tableLoader(tableLoader) diff --git a/docs/flink-writes.md b/docs/flink-writes.md index 2459480eb495..690fcd845498 100644 --- a/docs/flink-writes.md +++ b/docs/flink-writes.md @@ -193,7 +193,7 @@ FlinkSink.builderFor( ### Branch Writes Writing to branches in Iceberg tables is also supported via the `toBranch` API in `FlinkSink` -For more information on branches please refer to [branches](../../tables/branching). +For more information on branches please refer to [branches](../tables/branching). ```java FlinkSink.forRowData(input) .tableLoader(tableLoader) diff --git a/docs/spark-ddl.md b/docs/spark-ddl.md index 13b69e1f643c..21f6a50025d3 100644 --- a/docs/spark-ddl.md +++ b/docs/spark-ddl.md @@ -482,11 +482,11 @@ the snapshot to create the branch at and an optional retention clause. ```sql -- CREATE audit-branch at snapshot 1234 with default retention. -ALTER TABLE prod.db.sample CREATE BRANCH audit-branch +ALTER TABLE prod.db.sample CREATE BRANCH `audit-branch` AS OF VERSION 1234 -- CREATE audit-branch at snapshot 1234, retain audit-branch for 31 days, and retain the latest 31 days. The latest 3 snapshot snapshots, and 2 days worth of snapshots -ALTER TABLE prod.db.sample CREATE BRANCH audit-branch +ALTER TABLE prod.db.sample CREATE BRANCH `audit-branch` AS OF VERSION 1234 RETAIN 30 DAYS WITH RETENTION 3 SNAPSHOTS 2 DAYS ``` @@ -499,10 +499,10 @@ the snapshot to create the branch at and an optional retention clause. ```sql -- CREATE historical-tag at snapshot 1234 with default retention. -ALTER TABLE prod.db.sample CREATE TAG historical-tag AS OF VERSION 1234 +ALTER TABLE prod.db.sample CREATE TAG `historical-tag` AS OF VERSION 1234 -- CREATE historical-tag at snapshot 1234 and retain it for 1 year. -ALTER TABLE prod.db.sample CREATE TAG historical-tag +ALTER TABLE prod.db.sample CREATE TAG `historical-tag` AS OF VERSION 1234 RETAIN 365 DAYS ``` @@ -513,7 +513,7 @@ the `REPLACE BRANCH` sql. Retention can also be updated in this statement. ```sql -- REPLACE audit-branch to reference snapshot 4567 and update the retention to 60 days -ALTER TABLE prod.db.sample REPLACE BRANCH audit-branch +ALTER TABLE prod.db.sample REPLACE BRANCH `audit-branch` AS OF VERSION 4567 RETAIN 60 DAYS ``` @@ -522,7 +522,7 @@ AS OF VERSION 4567 RETAIN 60 DAYS Branches can be removed via the `DROP BRANCH` sql ```sql -ALTER TABLE prod.db.sample DROP BRANCH audit-branch +ALTER TABLE prod.db.sample DROP BRANCH `audit-branch` ``` #### `ALTER TABLE ... DROP TAG` @@ -530,5 +530,5 @@ ALTER TABLE prod.db.sample DROP BRANCH audit-branch Tags can be removed via the `DROP TAG` sql ```sql -ALTER TABLE prod.db.sample DROP TAG historical-tag +ALTER TABLE prod.db.sample DROP TAG `historical-tag` ``` \ No newline at end of file diff --git a/docs/spark-writes.md b/docs/spark-writes.md index bffbbf9be0b9..29c1e2244787 100644 --- a/docs/spark-writes.md +++ b/docs/spark-writes.md @@ -210,7 +210,7 @@ Branch writes can also be performed as part of a write-audit-publish (WAP) workf Note WAP branch and branch identifier cannot both be specified. Also, the branch must exist before performing the write. The operation does **not** create the branch if it does not exist. -For more information on branches please refer to [branches](../../tables/branching) +For more information on branches please refer to [branches](../tables/branching) ```sql -- INSERT (1,' a') (2, 'b') into the audit branch.