Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/reference/statements/alter/partition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ ALTER TABLE mt DROP PARTITION '2020-11-21';
ALTER TABLE mt DROP PART 'all_4_4_0';
```

On Iceberg tables, `DROP PARTITION` drops the partition by writing a new snapshot with the partition data files excluded.

By default, no parquet files are physically deleted from object storage.
The `data_lake_delete_data_on_drop` option must be enabled for data files to be purged.

:::note
Purging data files will break time travel to older snapshots that reference that partition.
:::

Example purging data files:

```sql
ALTER TABLE mt DROP PARTITION tuple(toRelativeDayNum(toDate('2026-01-01')))
SETTINGS data_lake_delete_data_on_drop = 1;
```

## DROP DETACHED PARTITION\|PART {#drop-detached-partitionpart}

```sql
Expand Down
Loading
Loading