Skip to content

Conversation

@TylerHillery
Copy link
Contributor

What kind of change does this PR introduce?

Adds the ability to specify if you want purgeRequested set to true or false on the drop table operation.

What is the current behavior?

Currently there is no way to configure the purgeRequested query parameter when dropping a table. The API endpoint supports this parameter to optionally purge the table's data.

What is the new behavior?

Users can now pass an optional options parameter to dropTable() with a purge boolean flag:

// Purge table data (purgeRequested=true)
await catalog.dropTable({ namespace: ['analytics'], name: 'events' }, { purge: true })

// Keep table data (purgeRequested=false, default)
await catalog.dropTable({ namespace: ['analytics'], name: 'events' })

The purge option is mapped to the purgeRequested query parameter expected by the Iceberg REST API. Let me know if we'd prefer to just keep it as the queryParameter.

Additional Context

image

@TylerHillery TylerHillery marked this pull request as ready for review November 21, 2025 12:52
@TylerHillery TylerHillery requested review from a team as code owners November 21, 2025 12:52
@mandarini mandarini merged commit ba5b723 into main Nov 21, 2025
3 checks passed
@mandarini mandarini deleted the tyler/feat/add-purge-flag-to-drop-tables branch November 21, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants