如何将数据从 Glue 移动到 Dynamodb [英] How to move data from Glue to Dynamodb

查看:35
本文介绍了如何将数据从 Glue 移动到 Dynamodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为我们的一个仪表板应用程序设计一个大数据解决方案,并认真考虑将 Glue 用于我们的初始 ETL.目前 Glue 支持 JDBC 和 S3 作为目标,但我们的下游服务和组件将更好地与 dynamodb 配合使用.我们想知道最终将记录从 Glue 移动到 Dynamo 的最佳方法是什么.

We are designing an Big data solution for one of our dashboard applications and seriously considering Glue for our initial ETL. Currently Glue supports JDBC and S3 as the target but our downstream services and components will work better with dynamodb. We are wondering what is the best approach to eventually move the records from Glue to Dynamo.

我们是否应该先写入 S3,然后运行 ​​lambdas 将数据插入 Dynamo?这是最佳做法吗?或者我们是否应该为 Dynamodb 使用第三方 JDBC 包装器并使用 Glue 直接写入 Dynamo(不确定这是否可能,听起来有点吓人)或者我们应该做点别的吗?

Should we write to S3 first and then run lambdas to insert the data into Dynamo? Is that the best practice? OR Should we use a third party JDBC wrapper for Dynamodb and use Glue to directly write to Dynamo (Not sure if this is possible, sounds a bit scary) OR Should we do something else?

非常感谢任何帮助.谢谢!

Any help is greatly appreciated. Thanks!

推荐答案

您可以将以下行添加到您的 Glue ETL 脚本中:

You can add the following lines to your Glue ETL script:

    glueContext.write_dynamic_frame.from_options(frame =DynamicFrame.fromDF(df, glueContext, "final_df"), connection_type = "dynamodb", connection_options = {"tableName": "pceg_ae_test"})

df 应该是 DynamicFrame 类型

df should be of type DynamicFrame

这篇关于如何将数据从 Glue 移动到 Dynamodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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