将表从一个Redshift集群复制到另一个Redshift集群(不使用s3)

编程入门 行业动态 更新时间:2024-10-24 10:20:26
本文介绍了将表从一个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:

docs.aws.amazon/redshift/latest/dg/t_Unloading_tables .html docs.aws.amazon/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:

docs.aws.amazon/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)

本文发布于:2023-11-24 10:29:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624843.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:集群   Redshift

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!