I was surprised to learn that the following arrange(random()) works as part of a query. But I couldn't find it in the documentation?
library(dplyr)
con <- DBI::dbConnect(duckdb::duckdb())
df <- tibble::tibble(id = 1:10, value = letters[1:10])
copy_to(con, df, "my_table")
tbl(con, "my_table") |>
arrange(random()) |>
collect()