无法将数据从Snowflake复制到Azure Blob [英] Cannot copy data from Snowflake into Azure Blob

本文介绍了无法将数据从Snowflake复制到Azure Blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Azure数据工厂将数据从Snowflake复制到Azure Blob.

I am trying to copy data from Snowflake into an Azure Blob using Azure Data Factory.

我使用的角色在表上具有选择权限,并且使用Snowflake控制台查询数据没有问题.

The role I am using has select permissions on the table, and I have no issues querying the data using the Snowflake console.

我还能够使用相同的SAS令牌从其他来源(在Azure中)复制到目标blob中.

I am also able to copy into the targeted blob from other sources (in Azure) using the same SAS token.

这是我由Azure数据工厂生成的查询(省略了具体内容)

This is the query I have, generated by Azure Data Factory, (with specifics omitted)

COPY INTO 'azure://****.blob.core.windows.net/snowflake-stage/********-****-****-****-************/SnowflakeExportCopyCommand/'
FROM (select * from MYSCHEMA.MYTABLE)
CREDENTIALS = (AZURE_SAS_TOKEN = '****')
FILE_FORMAT = (type = CSV COMPRESSION = GZIP RECORD_DELIMITER = '
' FIELD_OPTIONALLY_ENCLOSED_BY = '"' ESCAPE = '\\' NULL_IF = '')
HEADER = TRUE
SINGLE = FALSE
OVERWRITE = TRUE
MAX_FILE_SIZE  = 268435456

这是我得到的错误:

ErrorCode = UserErrorOdbcOperationFailed,'Type = Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message =错误[42501]无法访问远程文件:访问被拒绝.

ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [42501] Failed to access remote file: access denied.

请检查您的凭据,Source = Microsoft.DataTransfer.Runtime.GenericOdbcConnectors,''Type = System.Data.Odbc.OdbcException,Message = ERROR[42501]无法访问远程文件:访问被拒绝.请检查您的凭据,来源=雪花,'

Please check your credentials,Source=Microsoft.DataTransfer.Runtime.GenericOdbcConnectors,''Type=System.Data.Odbc.OdbcException,Message=ERROR [42501] Failed to access remote file: access denied. Please check your credentials,Source=Snowflake,'

我需要更多的Snowflake权限才能进行这种复制吗?还是这可能与Azure容器的写入权限有关?

Are there more Snowflake permissions that I need in order to do this kind of copy? Or is this perhaps an issue with the write-permissions to the Azure container?

推荐答案

解决方案"因为这表明Blob本身的权限可能存在错误.

The "solution" for this indicates a likely bug for the permissions on the blob itself.

将容器权限切换为公共",然后再次回到私有"即可解决此问题.

Switching the container permissions to public, then back to private again fixes the issue.

这篇关于无法将数据从Snowflake复制到Azure Blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆