arrow_write_data_set: Write a dataset to file using arrow

View source: R/arrow.R

arrow_write_data_setR Documentation

Write a dataset to file using arrow

Description

Write a dataset to file using arrow

Usage

arrow_write_data_set(
  data,
  file_path = NULL,
  format = c("parquet", "feather", "arrow", "ipc", "csv"),
  partitioning = dplyr::group_vars(data),
  base_file_name = paste0("part-{i}.", as.character(format)),
  hive_style = TRUE,
  existing_data_behavior = c("overwrite", "error", "delete_matching"),
  ...
)

Arguments

...

Examples

library(asbtools)
library(tidyverse)

data <- ggplot2::diamonds %>% tbl_arrow()

arrow_write_data_set(data = data, file_path  = "Desktop/arrow_test_write", format = "csv")
arrow_write_data_set(data = data, file_path  = "Desktop/arrow_test_write", format = "feather")
arrow_write_data_set(data = data, file_path  = "Desktop/arrow_test_write", format = "parquet")
arrow_write_data_set(data = as_tibble(data), file_path  = "Desktop/arrow_test_write", format = "parquet")




abresler/asbtools documentation built on July 28, 2022, 11:04 p.m.