将数据从 hive 取出并放入 mysql @ AWS?

发布于 2024-12-18 01:54:31 字数 302 浏览 5 评论 0原文

我很想使用 Sqoop,但不认为仅仅为了这个就值得在 ElasticMapReduce(我真的很喜欢)上运行 Cloudera stack @ AWS。

我目前的想法只是将我需要的数据写入@ S3 中的外部表,然后编写一个脚本将其导入到 mysql 中。亚马逊有一些关于 SimpleDB 的东西(示例),但我不确定路线也可以吗? S3 中的数据很好,只是想知道是否有人有更好的主意。

谢谢!

I'd love to use Sqoop but don't think it is worth running the Cloudera stack @ AWS over ElasticMapReduce (which I really like) just for this.

My current thought is just to write the data I need moved to an external table housed @ S3 and then write a script to import it into mysql. Amazon has some stuff with SimpleDB (example), but I am not sure about that route either? Fine with the data living at S3, just wondering if anyone has a better idea.

Thanks!

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

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

发布评论

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

评论(1

娇女薄笑 2024-12-25 01:54:31

我使用的最简单的解决方案并且效果很好:

  1. 就像您建议的那样将数据放入 S3 存储桶中。您可以创建一个托管在 S3 上并具有制表符分隔格式的表。如果您在最后一步中使用一个减速器,您最终将只得到一个文件。
  2. 将数据下载到您的 MySQL 服务器,我最喜欢的工具是 s3cmd
  3. 使用 LOAD DATA INFILE 将数据直接导入 MySQL。 ..

The easiest solution which I use and works great:

  1. Just as you suggested put your data into S3 bucket. You can create a table that is hosted on S3 and has a e.g. tab-separated format. If you use one reducer in your final step you will end up with one file only.
  2. Download the data to your MySQL server, my favourite tool would be s3cmd
  3. Import your data straight into MySQL using LOAD DATA INFILE...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文