duckdblabs / duckplyr

A drop-in replacement for dplyr, powered by DuckDB for performance.
https://duckdblabs.github.io/duckplyr/
Other
215 stars 11 forks source link

Is generated SQL available? #132

Open bob-rietveld opened 2 months ago

bob-rietveld commented 2 months ago

Hi,

Thanks for your work on this package, it's super nice and fast! May be I missed it , but is there somewhere I can access the SQL statement that is being executed on duckdb ? Explain() provides the plan, but is it possible to get the SQL statement in a variable in R? Similar to show_query() in dbplyr (https://dbplyr.tidyverse.org/articles/sql.html) , is what I am looking for. Thanks.

krlmlr commented 2 months ago

duckplyr never generates SQL. Need to update the documentation to clarify this.

krlmlr commented 2 months ago

We use the "relational API" that is very similar to Codd's relational algebra. These functions are currently private in duckdb.

bob-rietveld commented 2 months ago

Aha, thanks for clarifying.