11# ' @title Compute results to a file
22# '
33# ' @description
4- # ' These functions apply to (lazy ) duckplyr frames.
4+ # ' These functions apply to (funneled ) duckplyr frames.
55# ' They executes a query and stores the results in a flat file.
66# ' The result is a duckplyr frame that can be used with subsequent dplyr verbs.
77# '
88# ' `compute_parquet()` creates a Parquet file.
99# '
1010# ' @inheritParams rlang::args_dots_empty
1111# ' @inheritParams compute.duckplyr_df
12- # ' @inheritSection duckdb_tibble Eager and lazy
12+ # ' @inheritSection duckdb_tibble Funneling
1313# ' @param path The path to store the result in.
1414# ' @param options A list of additional options to pass to create the storage format,
1515# ' see <https://duckdb.org/docs/data/parquet/overview#writing-to-parquet-files>
2626# ' explain(df)
2727# ' @seealso [compute.duckplyr_df()], [dplyr::collect()]
2828# ' @name compute_file
29- compute_parquet <- function (x , path , ... , lazy = NULL , options = NULL ) {
29+ compute_parquet <- function (x , path , ... , funnel = NULL , options = NULL ) {
3030 check_dots_empty()
3131
3232 if (is.null(options )) {
3333 options <- list ()
3434 }
3535
36- if (is.null(lazy )) {
37- lazy <- get_lazy_duckplyr_df (x )
36+ if (is.null(funnel )) {
37+ funnel <- get_funnel_duckplyr_df (x )
3838 }
3939
4040 rel <- duckdb_rel_from_df(x )
@@ -46,23 +46,23 @@ compute_parquet <- function(x, path, ..., lazy = NULL, options = NULL) {
4646 path <- file.path(path , " **" , " **.parquet" )
4747 }
4848
49- read_parquet_duckdb(path , lazy = lazy )
49+ read_parquet_duckdb(path , funnel = funnel )
5050}
5151
5252# ' compute_csv()
5353# '
5454# ' `compute_csv()` creates a CSV file.
5555# ' @rdname compute_file
5656# ' @export
57- compute_csv <- function (x , path , ... , lazy = NULL , options = NULL ) {
57+ compute_csv <- function (x , path , ... , funnel = NULL , options = NULL ) {
5858 check_dots_empty()
5959
6060 if (is.null(options )) {
6161 options <- list ()
6262 }
6363
64- if (is.null(lazy )) {
65- lazy <- get_lazy_duckplyr_df (x )
64+ if (is.null(funnel )) {
65+ funnel <- get_funnel_duckplyr_df (x )
6666 }
6767
6868 rel <- duckdb_rel_from_df(x )
@@ -74,5 +74,5 @@ compute_csv <- function(x, path, ..., lazy = NULL, options = NULL) {
7474 path <- file.path(path , " **" , " **.csv" )
7575 }
7676
77- read_csv_duckdb(path , lazy = lazy )
77+ read_csv_duckdb(path , funnel = funnel )
7878}
0 commit comments