简体   繁体   English

将数据从Redshift复制到MySQL / PSQL

[英]Copy data from Redshift To MySQL/PSQL

I tried searching for it but couldn't find out... 我试着寻找它但却找不到......

What is the best way to copy data from Amazon Redshift to MySQL/PSQL Database ? 将数据从Amazon Redshift复制到MySQL / PSQL数据库的最佳方法是什么?

Only solution I know of is to copy data from Redshift to my machine and then move it to MySQL/PSQL but that of course, is I/O intensive and not scalable. 我所知道的唯一解决方案是将数据从Redshift复制到我的机器,然后将其移动到MySQL / PSQL,但这当然是I / O密集型且不可扩展。

Can anyone please suggest something better (may be something via S3) ? 任何人都可以建议更好的东西(可能是通过S3的东西)?

There are many ways you can do that: 有很多方法可以做到这一点:

  1. Use UNLOAD command of Redshift to export and upload table data into S3. 使用Redshift的UNLOAD命令将表数据导出并上传到S3。 Then import them into your psql/ MySQL tables using the AWS S3 SDK(maybe using Python/ Java) 然后使用AWS S3 SDK将它们导入到psql / MySQL表中(可能使用Python / Java)

  2. Use AWS Data Pipeline to create dataflows to export Redshift data and import them into your choice of databases 使用AWS Data Pipeline创建数据流以导出Redshift数据并将其导入您选择的数据库

  3. Use AWS SDKs to programmatically export Redshift data using Python/ Java/ Ruby and import the data back into your databases. 使用AWS开发工具包以编程方式使用Python / Java / Ruby导出Redshift数据,并将数据导入数据库。

This is exactly what AWS Data Pipeline is built for. 这正是AWS Data Pipeline的构建方式。 Please have a look at our working sample for accomplishing what you want to do: 请查看我们的工作示例,以完成您想要做的事情:

https://github.com/awslabs/data-pipeline-samples/tree/master/samples/RedshiftToRDS https://github.com/awslabs/data-pipeline-samples/tree/master/samples/RedshiftToRDS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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