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 current DuckLake connection
set_ducklake_connection()
Set the DuckLake connection

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
extract_assignments_from_sql()
Extract column assignments from SQL SELECT statement

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
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

Backup and Maintenance

Backup and restore operations

backup_ducklake()
Create a complete DuckLake backup