duckplyr
duckplyr copied to clipboard
[Question] Best Practices for changing DuckDB Settings
Hi all, thanks for developing such a fantastic package!
I frequently have to change configuration settings for DuckDB in order to get my queries to run, and am writing to ask: is there an established best practice for configuring DuckDB using duckplyr
? So far, I have been changing the configuration settings using the DBI interface as follows:
con <- duckplyr:::get_default_duckdb_connection()
dbExecute(con, "SET preserve_insertion_order = false;")
dbExecute(con, "SET memory_limit ='100GB';")
I'm sure that this isn't ideal as it relied on using an unexported function, get_default_duckdb_connection
. I have also tried using the .duckdbrc
file, but I was not confident that the settings were being properly applied (and it seemed less ergonomic to me). Is there a recommended way to change DuckDB settings using duckplyr
?
Best, and thanks for your help, Ben