Snowpipe支持从GCS(Google云存储)外部平台加载数据

时间:2019-10-15 17:47:41

标签: snowflake-data-warehouse

(用户在此论坛上发布的一个有趣的问题)


我们正在尝试从GCS提取数据,并希望使用Snowpipe REST API进行此操作,但目前还没有成功。你们能让我们知道GCS是否支持Snowpipe(用于连续加载以及通过REST端点触发)。另外,如果不受支持,我们可以知道GCS Snowpipe支持的时间表。

1 个答案:

答案 0 :(得分:2)

(以下答案最初由Snowflake技术客户经理提供)


到目前为止,GCS不支持雪管。计划未来。对于时间表,我们需要与Snowflake支持取得联系。

https://community.snowflake.com/s/article/3-27-Release-Notes-June-4-2019

虽然不是Snowpipe,但您可以利用某些本地GCP功能来完成GCP存储桶中文件的自动加载,我可以通过以下三个步骤来实现:

1,创建GCP PubSub主题-说明:https://cloud.google.com/pubsub/docs/admin

2,使用本文作为参考,创建一个GCP“云功能”,将其复制到命令中: https://medium.com/@phil.goerdt/automating-your-snowflake-database-cloning-with-gcp-b30a84f04b6d

更多说明:https://cloud.google.com/functions/docs/quickstart-console

3,在存储桶上创建一个GCP“通知”,这是当文件到达或在GCS存储桶上更新时将被调用的“触发”。

create or replace procedure select_from_department(
  col_name in varchar2,
  c_res      out sys_refcursor
) 
is
  l_sql varchar2(300);
begin
  l_sql := 'select ' || dbms_assert.simple_sql_name(col_name) || ' from departments';
  open c_res for l_sql ;
end;

它不像Snowpipe那样酷,但是它应该可以工作,祝你好运!