Skip to content

Commit

Permalink
Correct rename_column, move_before and delete_column in api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppe-dos authored Jan 6, 2025
1 parent 95f44bc commit 841d4dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkdocs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ Renaming a field in an Iceberg table is simple:
with table.update_schema() as update:
update.rename_column("retries", "num_retries")
# This will rename `confirmed_by` to `exchange` in the `details` struct
update.rename_column("details", "confirmed_by"), "exchange")
update.rename_column(("details", "confirmed_by"), ("detail", "exchange"))
```

### Move column
Expand All @@ -977,7 +977,7 @@ with table.update_schema() as update:
# This will move `bid` after `ask`
update.move_after("bid", "ask")
# This will move `confirmed_by` before `exchange` in the `details` struct
update.move_before("details", "confirmed_by"), ("details", "exchange"))
update.move_before(("details", "confirmed_by"), ("details", "exchange"))
```

### Update column
Expand Down Expand Up @@ -1010,7 +1010,7 @@ Delete a field, careful this is a incompatible change (readers/writers might exp
with table.update_schema(allow_incompatible_changes=True) as update:
update.delete_column("some_field")
# In a struct
update.delete_column("details", "confirmed_by"))
update.delete_column(("details", "confirmed_by"))
```

## Partition evolution
Expand Down

0 comments on commit 841d4dc

Please sign in to comment.