Skip to contents

Returns the DuckDB connection that all ducklake functions share. The first call creates the connection automatically, so you never need to set one up yourself. If you want ducklake to use a connection you have created (for example, one shared with other tools), register it first with set_ducklake_connection().

Usage

get_ducklake_connection()

Value

A DuckDB connection object (a duckdb_connection).

Details

The automatically created connection is backed by a temporary database file (not :memory:) with a spill directory configured, so larger-than-memory operations work out of the box. It is closed automatically when the R session ends.

Examples

if (FALSE) { # \dontrun{
conn <- get_ducklake_connection()
DBI::dbGetQuery(conn, "SELECT version()")
} # }