雪花作为档案库?

Snowflake as an archive store?

(正在为 Snowflake 用户寻找以下内容的确认)


用户:

I wanted to find out if archival use case will be a right fit for Snowflake. My data lake/DW is on Snowflake but I have a requirement to archive data that is n years old. Should I use S3 or Glacier instead. My understanding is that if I archive on s3/glacier retrieval will be complex.

回复:

I would suggest to compare the storage cost for Snowflake storage vs AWS Glacier/S3.

In case if you plan to query data you have following options:

a. AWS Glacier Select (has limitation)

b. Copy data from Glacier to S3 and then query via Athena or Snowflake

c. Snowflake query for S3 storage.

d. If the data is in Snowflake then Snowflake sql.

Overall Snowflake separate table storage options looks better.


我们能否从 SO 社区获得上述确认?

在我看来,将数据保存在 Snowflake 中不再是一种奢侈,对于 AWS 上的客户 运行,底层存储是 S3(默认情况下由 Snowflake 压缩)。在将旧数据移动到另一个 table/schema 的意义上,您仍然可以执行 "archival",这样您就可以将基础 table 保持一定的大小(可以说,一定的性能,但是即便如此,在 Snowflake 中,这也可能是一个有争议的问题。

需要注意的一件事是,AWS Glacier 非常便宜,直到您需要从中检索数据。

另一种选择是存档 back into S3 from snowflake 并对存档数据使用外部 table。这对于检索来说会更慢,而且我认为它不会比使用 Snowflake 便宜。我认为仅就纯存储成本而言,冰川将是最便宜的,但如果您需要查询数据,它就不是最佳选择。

如前一条评论所述,您可以将数据作为存档移动到单独的数据库,并根据需要限制对其的访问。如果您打算查询 Glacier,那么 Glacier 并不是一个很好的选择,因为这是您支付费用的地方。

另一件需要考虑的事情是,简单地将数据存储在 S3 与 Snowflake 中的最大区别在于 load/parse 数据的成本。 Loading/parsing 需要大量的计算能力,如果你使用 JSON 数据而不是 CSV,可能会更糟。在您的情况下,如果您已经在 Snowflake 中拥有数据,则导出回 S3 似乎是一种浪费。