Returns a lazy reference to a table in the attached DuckLake. Like
dplyr::tbl(), nothing is read until you collect(): build up your
filter()/mutate()/summarise() pipeline first and DuckDB executes it
as a single query, only pulling the rows you asked for into R.
Value
A lazy table (class tbl_ducklake) that works with dplyr verbs.
The table name is stored in the ducklake_table_name attribute.
See also
create_table() to create tables, get_ducklake_table_asof()
and get_ducklake_table_version() for time-travel reads.
Other table operations:
create_table(),
ducklake_exec(),
get_metadata_table(),
replace_table(),
show_ducklake_query()
Examples
if (FALSE) { # \dontrun{
attach_ducklake("my_lake", lake_path = "~/data/lake")
create_table(mtcars, "cars")
# Query lazily with dplyr, then collect
get_ducklake_table("cars") |>
dplyr::filter(cyl > 4) |>
dplyr::summarise(avg_mpg = mean(mpg), .by = cyl) |>
dplyr::collect()
} # }
