read_sql_duckdb: Return SQL query as duckdb_tibble
Description
![[Experimental]](figures/lifecycle-experimental.svg?package=duckplyr&version=1.0.1)
Runs a query and returns it as a duckplyr frame.
Usage
read_sql_duckdb(
sql,
...,
prudence = c("thrifty", "lavish", "stingy"),
con = NULL
)
Arguments
- sql
The SQL to run.
- ...
These dots are for future extensions and must be empty.
- prudence
Memory protection, controls if DuckDB may convert
intermediate results in DuckDB-managed memory to data frames in R memory.
"thrifty"
: up to a maximum size of 1 million cells,
"lavish"
: regardless of size,
"stingy"
: never.
The default is "thrifty"
for the ingestion functions,
and may be different for other functions.
See vignette("prudence")
for more information.
- con
The connection, defaults to the default connection.
Examples
Run this coderead_sql_duckdb("FROM duckdb_settings()")
Run the code above in your browser using DataLab