Skip to content

Commit

Permalink
Docs: Fix identifiers and links of branching (#8165)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuzhang authored Jul 31, 2023
1 parent 06b25aa commit 84e526f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/branching-and-tagging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/flink-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/flink-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions docs/spark-ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
```

Expand All @@ -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
```

Expand All @@ -522,13 +522,13 @@ 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`

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`
```
2 changes: 1 addition & 1 deletion docs/spark-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 84e526f

Please sign in to comment.