Skip to contents

Setup and Connection

Initialize and manage DuckLake connections

install_ducklake()
Install the ducklake extension to duckdb
attach_ducklake()
Create or attach a ducklake
detach_ducklake()
Detach from a ducklake
get_ducklake_connection()
Get the DuckDB connection used by ducklake
set_ducklake_connection()
Use your own DuckDB connection with ducklake
get_ducklake_backend()
Get the catalog backend type of an attached lake

Table Operations

Create and query tables

create_table()
Create a DuckLake table
get_ducklake_table()
Get a DuckLake table
replace_table()
Replace a table with modified data and create a new snapshot

Row Operations

Modify table rows with dplyr-style functions

rows_insert()
Insert rows into a DuckLake table
rows_update()
Update rows in a DuckLake table
rows_delete()
Delete rows from a DuckLake table

Query Execution

Execute and preview SQL queries

ducklake_exec()
Execute DuckLake operations from dplyr queries
show_ducklake_query()
Show the SQL that would be executed by ducklake operations

Transactions

ACID transaction support

with_transaction()
Execute code within a transaction
begin_transaction()
Begin a transaction
commit_transaction()
Commit a transaction
rollback_transaction()
Rollback a transaction

Time Travel

Query and restore historical data

get_ducklake_table_asof()
Query a table at a specific timestamp (time travel)
get_ducklake_table_version()
Query a table at a specific version/snapshot
get_table_changes()
Get the changes made to a table between two snapshots
list_table_snapshots()
List available snapshots for a table
restore_table_version()
Restore a table to a previous version

Metadata

Access metadata and snapshots

get_metadata_table()
Get a DuckLake metadata table
set_snapshot_metadata()
Set metadata for the most recent snapshot

Data Inlining

Configure and manage data inlining for streaming workloads

set_inlining_row_limit()
Set the data inlining row limit
get_inlining_row_limit()
Get the current data inlining row limit
flush_inlined_data()
Flush inlined data to Parquet files
checkpoint_ducklake()
Run a DuckLake checkpoint

Partitioning

Manage table partition keys for file pruning

set_table_partitioning()
Set partitioning keys for a table
reset_table_partitioning()
Remove partitioning keys from a table
get_table_partitions()
List the partitioning keys of tables in a lake

Backup and Maintenance

Backup, compaction, and storage reclamation

backup_ducklake()
Create a DuckLake backup
expire_snapshots()
Expire old snapshots
merge_adjacent_files()
Merge adjacent Parquet files
cleanup_old_files()
Delete files scheduled for removal
delete_orphaned_files()
Delete orphaned files
rewrite_data_files()
Rewrite data files with many deletes

Quack remote access

Connect to and serve DuckLake over the Quack protocol

install_quack()
Install the Quack extension
attach_quack()
Connect to a remote Quack server
detach_quack()
Disconnect from a remote Quack server
quack_query()
Run a one-off query against a remote Quack server
quack_serve()
Serve the current session over Quack
quack_stop()
Stop a Quack server