r-如何将csv或xlsx保存到S3存储桶中



即使实际的用例是将数据存储在闪亮的会话中,我简化了目标。

你能帮我了解我需要做什么更改才能将Csv/xsx保存到S3存储桶中吗?

相关但python从pypark数据帧将csv文件保存到s3存储桶中

library(tidyverse)
library(aws.s3)
# Authetication
aws.signature::use_credentials()
s3_bucket_link = # My s3 bucket link
df = fread("mtcars.csv")
#put object to s3
aws.s3::put_object(object = "mtcars.csv",
file = "mtcars.csv",
bucket = s3_bucket_link)
# Gives 403 or 404 error 
# But when I check my S3 bucket file isnt available !!!
library(tidyverse)
library(aws.s3)
# Authetication
aws.signature::use_credentials()
s3_bucket_link = # s3 bucket link
complete_path = # Complete S3 bucket path including folder within S3 bucket link
write.csv(mtcars,"mtcars.csv")
aws.s3::s3write_using(mtcars,
object = paste0(complete_path,"mtcars.csv"),
FUN = write.csv,
bucket = s3_bucket_link)

相关内容

  • 没有找到相关文章

最新更新