将表从一个Redshift集群复制到另一个Redshift集群(不使用s3) [英] Copying a table from one redshift cluster to another redshift cluster(without using s3)

查看:272
本文介绍了将表从一个Redshift集群复制到另一个Redshift集群(不使用s3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以直接将一个表从一个Redshift集群复制到另一个Redshift集群吗?

Can we directly copy a table from one redshift cluster to another redshift cluster?

我知道可以使用s3作为临时存储来实现表复制(即从第一个集群卸载到s3,然后从s3复制到另一个集群).

I know table copying can be achieved using s3 as temp storage(i.e. unload to s3 from first cluster and then copy from s3 to another cluster).

推荐答案

所以答案是否定的. 以下是我从AWS Support获得的回复.

So the answer is NO. Following is the reply I got from AWS Support.

你好, 非常感谢您与AWS Support联系.使用Amazon RedShift,我们没有一种将数据直接从RedShift集群中的表复制到另一个RedShift集群中的另一个表的机制.获得类似结果的正常过程是:

Hello, Thank you very much for contacting AWS Support. With Amazon RedShift, we do not have a mechanism to directly copy data from a table in a RedShift cluster to another table in another RedShift cluster. The normal procedure to achieve a similar result would be:

(1)卸载到S3,然后从S3复制

(1) UNLOAD to S3, then COPY from S3

通过这种方法,您可以将S3用作中间存储.首先,将数据从源集群卸载到S3,然后将数据从S3复制到目标集群.这是您熟悉的方法,也是我们建议的方法. RedShift被设计为可与S3一起使用,并且可以以相对较低的成本实现高效率.有关RedShift中UNLOADD和COPY操作的更多信息,请参阅以下AWS文档:

With this approach, you use S3 as the intermediate storage. First you UNLOAD the data from the source cluster to S3, then COPY the data from S3 on the destination cluster. This is the method that you are familiar with, and is also the method we recommend. RedShift was designed to work with S3, and can achieve high efficiency with relatively low cost in doing this. For more information about UNLOADD and COPY operations in RedShift, please refer to the following AWS documentation:

http://docs.aws.amazon.com/redshift/latest/dg/t_Unloading_tables .html http://docs.aws.amazon.com/redshift/latest/dg/t_loading-tables-from-s3.html

(2)使用群集快照

另一种方法是创建源群集的快照,然后将快照还原为目标群集.之后,从目标群集中删除不必要的表.问题是,如果目标集群上只需要一小部分数据(例如,十个表之一),那么您可能正在将(相对)大型集群用于(相对)小型应用程序.

An alternative approach would be creating a snapshot of the source cluster, then restore the snapshot as the destination cluster. After that, drop the unnecessary tables from the destination cluster. The issue is, if you only need a small portion of the data (for example, one of the ten tables) on the destination cluster, then you might be using a (relatively) big cluster for a (relatively) small application.

有关管理RedShift群集快照的更多信息,请参阅以下AWS文档:

For more information about managing RedShift cluster snapshots, please refer to the following AWS documentation:

http://docs.aws.amazon.com/redshift/latest/mgmt/managing-snapshots-console.html

总而言之,我们更喜欢UNLOAD和COPY流程,该流程非常简单且具有成本效益.

In summary, we prefer the UNLOAD and COPY process, which is quite straight forward and cost-effective.

这篇关于将表从一个Redshift集群复制到另一个Redshift集群(不使用s3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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