bdplyr() to diskWrites a remote table to disk that was called via bdplyr.
It will collect the data and write to disk in the chosen format.
You will only need this function if you have not yet collected the data
using the bd_collect().
The comprehensive function bd_write() takes as a parameter .write_fn,
which will be the name of some function (without parentheses) capable of
writing a tibble to disk.
As helpers, the bd_write_rds() and bd_write_csv() functions make it
easier to write in these formats, more common in everyday life, calling
writing functions from {readr} package.
bd_write(
.lazy_tbl,
.write_fn = `?`(typed::Function()),
path = `?`(typed::Character(length = 1)),
overwrite = `?`(FALSE, typed::Logical(1)),
...
)bd_write_rds(.lazy_tbl, path, overwrite = FALSE, compress = "none", ...)
bd_write_csv(
.lazy_tbl,
path = `?`(typed::Character(1)),
overwrite = `?`(FALSE, typed::Logical(1)),
...
)
String containing the path to the created file.
A lazy tibble, tipically the output of bdplyr().
A function for writing the result of a tibble to disk. Do not use () afther the function's name, the function object should be passed. Some functions the user might consider are: writexl::write_xlsx, jsonlite::write_json, foreign::write.dta, arrow::write_feather, etc.
String containing the path for the file to be created. The desired folders must already exist and the file should normally end with the corresponding extension.
FALSE by default. Indicates whether the local file should be overwritten if it already exists. Use with care.
Parameters passed to the .write_fn function.
For bd_write_rds() only. Compression method to use: "none"
(default), "gz" ,"bz", or "xz", in ascending order of compression.
Remember that the higher the compression, the smaller the file size on disk,
ut also the longer the time to load the data. See also: readr::write_rds().