Telemetry

library(conflicted)
library(duckplyr)
conflict_prefer("filter", "dplyr")
#> [conflicted] Removing existing preference.
#> [conflicted] Will prefer dplyr::filter over any other package.

As a drop-in replacement for dplyr, duckplyr will use DuckDB for the operations only if it can, and fall back to dplyr otherwise. A fallback will not change the correctness of the results, but it may be slower or consume more memory. We would like to guide our efforts towards improving duckplyr, focusing on the features with the most impact. To this end, duckplyr collects and uploads telemetry data about fallback situations, but only if permitted by the user:

The data collected contains:

Fallback is silent by default, but can be made verbose.

Sys.setenv(DUCKPLYR_FALLBACK_INFO = TRUE)
out <-
  flights_df() %>%
  summarize(.by = origin, paste(dest, collapse = " "))
#> Error processing duckplyr query with DuckDB, falling back to dplyr.
#> Caused by error in `rel_find_call()`:
#> ! No translation for function `paste`.

After logs have been collected, the upload options are displayed the next time the duckplyr package is loaded in an R session.

#> The duckplyr package is configured to fall back to dplyr when it encounters an
#> incompatibility. Fallback events can be collected and uploaded for analysis to
#> guide future development. By default, data will be collected but no data will
#> be uploaded.
#> ℹ Automatic fallback uploading is not controlled and therefore disabled, see
#>   `?duckplyr::fallback()`.
#> ✔ Number of reports ready for upload: 1.
#> → Review with `duckplyr::fallback_review()`, upload with
#>   `duckplyr::fallback_upload()`.
#> ℹ Configure automatic uploading with `duckplyr::fallback_config()`.

The fallback_sitrep() function describes the current configuration and the available options.