简体   繁体   中英

r - read zip file from s3 using r

Is it possible to read a zipped sas file (or any kind or file) from s3 using r?

Here is what I'm trying:

library(aws.s3)
library(haven)

s3read_using(FUN = read_sas(unzip(.)),
                   bucket = "s3://bucket/",
                   object = "file.zip") # and inside is a .sas7bdat file

but it's obviously not recognizing the . . I have not found any good info on reading a .zip file from s3

I was trying to read the zip file from S3 and store it in the local Linux system. Maybe you can try this and then unzip the file and read.

library("aws.s3")
save_object("s3://mybucket/input/test.zip", file = "/home/test.zip", bucket = "mybucket")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM