在S3中合并两个桌子

发布于 2025-02-08 00:39:53 字数 91 浏览 1 评论 0原文

我在同一水桶下的S3中有两个桌子。一个具有当前数据,另一个具有历史数据,我需要合并这两个表并将其移至其他存储桶中。我该如何使用Snoflake?我是新手,所以请任何建议

I have two tables in s3 under same bucket. one has current data and other has history data I need to merge these two tables and move it to a different bucket. How can I do that using snoflake? I am new to this so any suggestion please

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

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

发布评论

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

评论(2

允世 2025-02-15 00:39:53

最简单的方法可能是在两个表上创建外部表,然后将副本作为您的新S3存储桶和一个工会两个表的选择语句运行到语句中。

但是,我猜想完全可以在AWS中完成整个事情,而不涉及雪花很简单

Probably the simplest method would be to create External tables over the two tables and then run a COPY INTO statement with the target as your new S3 bucket and a select statement that unions both tables.

However, I'm guessing it would be simpler still to do the whole thing entirely in AWS and not involve Snowflake

战皆罪 2025-02-15 00:39:53

这取决于您要实现的目标,您可以将所有文件从两个表中放在一起吗?如果您需要选择一些列并具有某种转换,则使用雪花进行联合,然后写入其他位置将有能力。

It depends on what you want to achieve, can you just put all the files from two tables together? If you need to select out some columns and have some sort of transformation, then using Snowflake to perform a UNION and then write to a different location would do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文