如何从Apache Beam Python读取S3文件?

发布于 2025-01-26 11:30:56 字数 396 浏览 2 评论 0原文

我正在使用Apache Beam Python SDK读取S3文件数据。

我正在使用的代码

    ip = (pipe
          | beam.io.ReadFromText("s3://bucket_name/file_path")
          | beam.Map(lambda x: x.split(","))
          | beam.Map(print)

          )

,但它给

 S3ClientError('Unable to locate credentials', None)}")}

任何人都知道如何向S3客户端thorugh apache beam Python文件提供凭据

I am using Apache Beam python SDK to read s3 file data.

code I am using

    ip = (pipe
          | beam.io.ReadFromText("s3://bucket_name/file_path")
          | beam.Map(lambda x: x.split(","))
          | beam.Map(print)

          )

but it gives a error

 S3ClientError('Unable to locate credentials', None)}")}

Anybody have any idea how to give credentials to s3 client thorugh apache beam python file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

在梵高的星空下 2025-02-02 11:30:56

您需要确保工具机上的凭据可用。做到这一点的一种方法是将它们安装在a 自定义容器

You need to ensure the credentials are available on your worker machines. One way to do this is installing them in a custom container.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文