Coerce data into a DuckDB-backed lazy table
Source: R/utils-misc.R
Ensures the input is a database-backed object. If a data.frame is provided, it is registered into a temporary, in-memory DuckDB instance. If already a tbl_dbi, it is returned unchanged.
Usage
make_db_tbl(x)Arguments
Value
A tbl_dbi object backed by DuckDB.
Details
When converting a data.frame, this function preserves existing dplyr groups. It uses DuckDB’s duckdb_register, which is a virtual registration and does not perform a physical copy of the data, making it extremely fast.