Snowflake - CREATE STAGE - 动态模式 url with Azure

Snowflake - CREATE STAGE - Pattern for dynamic url with Azure

我想为阶段指定动态 url,但 * 不起作用。有什么办法吗?

我想做这样的事情:

CREATE OR REPLACE STAGE MY_STAGE
  url                   = 'azure://mystorage.blob.core.windows.net/mycontainer/myfolder/*/myparquet'  
  credentials           = ...
  file_format           = (type = 'parquet')
;

我不确定是否有办法在一个阶段执行此操作,但您可以在复制语句中执行此操作。

因此您可以像这样设置舞台:

CREATE OR REPLACE STAGE MY_STAGE
  url                   = 'azure://mystorage.blob.core.windows.net/mycontainer/myfolder/'  
  credentials           = ...
  file_format           = (type = 'parquet')
;

然后使用 copy into 语句,如下所示:

copy into mytable
from @MY_STAGE
  pattern='.*/myparquet';

Copy into documentation