从 Google Cloud Storage 批量加载

如果您已经拥有 Google Cloud Storage 账户并使用 Cloud Storage 桶来存储和管理数据文件,您可以使用向 Snowflake 批量加载数据的现有桶和文件夹路径。

Note

Snowflake 仅支持区域存储和多区域存储账户。

This set of topics describes how to use the COPY INTO <table> command to load data from a Cloud Storage bucket into tables.

如下图所示,从 Cloud Storage 桶加载数据分两步执行:

Step 1:

Snowflake 假定数据文件已暂存在 Cloud Storage 桶中。如果尚未暂存,请使用 Google 提供的上传接口/实用程序来暂存文件。

Step 2:

Use the COPY INTO <table> command to load the contents of the staged file(s) into a Snowflake database table. You can load directly from the bucket, but Snowflake recommends creating an external stage that references the bucket and using the external stage instead.

无论您使用哪种方法,如果您手动或在脚本中执行命令,此步骤都需要运行一个当前虚拟仓库的会话。仓库提供计算资源,以执行将行实际插入到表中的操作。

Data loading overview

Note

只要您的 Snowflake 账户托管在 Google Cloud 上,您的网络流量就不会穿过公共互联网。

Tip

The instructions in this set of topics assume you have read Preparing to load data and have created a named file format, if desired.

Before you begin, you may also want to read Data loading considerations for best practices, tips, and other guidance.

后续主题: