publish_data()
Publish data to S3
Uploads a data frame or existing data file to S3.
Usage
publish_data(data, dest, format = "csv", connection = NULL, compress = FALSE)
Arguments
| Name | Description |
|---|---|
| data |
Data frame or character path to existing file. |
| dest |
Character. Destination path in S3 (required for data frames). |
| format |
Character. Output format when |
| connection |
Character or NULL. S3 connection name, or NULL for default. |
| compress |
Logical. Whether to gzip compress. Default FALSE. |
Value
Character. Public URL of the published data.
Examples
if (FALSE) {
# Publish a data frame
publish_data(my_df, "datasets/customers.csv")
# Publish as RDS
publish_data(my_df, "datasets/customers.rds", format = "rds")
# Publish existing file
publish_data("outputs/model.rds", "models/v2/model.rds")
}