尝试检索存储桶元数据时,使用aws.s3 :: get_bucket_df()返回错误? [英] Using aws.s3::get_bucket_df() returns errors when trying to retrieve bucket meta data?

查看:146
本文介绍了尝试检索存储桶元数据时,使用aws.s3 :: get_bucket_df()返回错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在S3中有一个存储库:

I have a repository in S3:

my_bucket:
    folder1
      subfolder11
        subfolder111
    folder2
      subfolder21
       subfolder221

我正在尝试连接并加载存储桶中所有相关文件夹中的所有文件.这是我尝试执行的操作:

I am trying to connect and load all files in all relevant folders in my bucket. Here is how I am trying to do this:

library(aws.s3)
bl <- bucketlist()

### Builds a dataframe of the files in a bucket###
dfBucket <- get_bucket_df(bucket = "my_bucket", prefix = "folder1/", max = Inf)

我遇到以下错误:

z [["Owner"]] [["ID"]]中的错误:下标超出范围

Error in z[["Owner"]][["ID"]] : subscript out of bounds

请告知.

更新: 实际上,我可以在其他存储桶上运行此命令,而问题集中在存储在S3中此特定存储桶中的文件名太长.

UPDATE: I actually can run this command on other buckets and the issue is focusing on very long file names stored in this particular bucket in S3.

请根据新信息建议解决方法.

Please advise how to solve it given the new info.

推荐答案

使用rbindlist(dfBucket)解决.

在我的情况下,get_bucket()起作用了,并返回了存储桶内容的列表.

In my case get_bucket() did work and returned a list of bucket contents.

get_bucket_df()返回错误:

z [["Owner"]] [["ID"]]中的错误:下标超出范围

Error in z[["Owner"]][["ID"]] : subscript out of bounds

我试图找出可以解决我问题的方法,并使用rbindlist解决了我的问题.

I have tried to find out what can solve my issue and used rbindlist which solved my issue.

那些评论和批评我答案的人,我完全不同意.如果您知道如何解决,请分享您的答案.不提供解决方案就抛出批评家是不专业的!

Those who commented and criticized my answer, I am totally don't agree. If you know how to solve, please share your answer. It's not professional to throw critics without providing a solution!

这篇关于尝试检索存储桶元数据时,使用aws.s3 :: get_bucket_df()返回错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆