英文:
Failure using stage area. Cause: Server failed to authenticate the request. (Status Code: 401; Error Code: InvalidAuthenticationInfo) in AZURE Storage
问题
我是新手使用Snowflake。我试图在Snowflake中使用Azure Blob存储创建存储集成和阶段。我已成功创建了阶段,但无法访问(列出 @mydb.extn_stages.stage_json;)该阶段,并显示以下错误消息:
错误:“使用阶段区域失败。原因:[服务器未能验证请求。请参考www-authenticate标头中的信息。(状态代码:401;错误代码:InvalidAuthenticationInfo)]”
**注意:**我已检查了URL、租户ID、角色,并在Azure中添加了所有权限,但都没有为我解决问题。
有人能帮助我解决这个问题吗?
以下是我迄今为止所执行的命令:
创建或替换存储集成azsf_mydb_aug23
类型=EXTERNAL_STAGE
存储提供程序=AZURE
启用=TRUE
存储允许位置=('azure://sampleblobstorage123456.blob.core.windows.net/sampleblob')
AZURE_TENANT_ID='3b0393d8-32db-4ab6-b717-64a3193c5ace'
注释='integration';
以上命令用于创建存储集成
//创建阶段对象
创建或替换阶段mydb.extn_stages.stage_json存储集成=
azsf_mydb_aug23 url='azure://sampleblobstorage123456.blob.core.windows.net/sampleblob';
在下面的命令中,我遇到了错误
//列出阶段中的文件
列出@mydb.extn_stages.stage_json;
英文:
I am new to snowflake. I am trying to create storage integration followed by stage by using azure blob storage in snowflake. I have successfully created the stage but I cannot able to access(list @mydb.extn_stages.stage_json;) the stage with following error message i.e.
Error: "Failure using stage area. Cause: [Server failed to authenticate the request. Please refer to the information in the www-authenticate header. (Status Code: 401; Error Code: InvalidAuthenticationInfo)]"
Note: I have checked the URL, Tenant Id, checked the roles, and added the all permissions in Azure but none of them worked for me.
Can anyone help me how to resolve the issue.
Here is the command(s) what I have done so far
CREATE OR REPLACE STORAGE INTEGRATION azsf_mydb_aug23
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = AZURE
ENABLED = TRUE
STORAGE_ALLOWED_LOCATIONS = ('azure://sampleblobstorage123456.blob.core.windows.net/sampleblob')
AZURE_TENANT_ID = '3b0393d8-32db-4ab6-b717-64a3193c5ace'
COMMENT = 'integration';
The above command is for creating storage integration
//creating stage object
create or replace stage mydb.extn_stages.stage_json storage_integration =
azsf_mydb_aug23 url = 'azure://sampleblobstorage123456.blob.core.windows.net/sampleblob';
Here in the below command I am getting error
//Listing files in the stage
list @mydb.extn_stages.stage_json;
答案1
得分: 1
在使用阶段区域时发生故障。原因:服务器无法验证请求。(状态代码:401;错误代码:InvalidAuthenticationInfo)在AZURE Storage
在使用共享访问签名时,错误消息指出Snowflake无法访问远程文件,并建议您在Azure Blob Storage中为Snowflake提供足够的访问权限。
解决方法:
授予Snowflake对存储位置的访问权限
- 执行
DESCRIBE INTEGRATION
命令以检索同意URL:
DESC STORAGE INTEGRATION azsf_mydb_aug23;
- 在Web浏览器中转到
AZURE_CONSENT_URL
列中的URL。通过单击“接受”按钮来接受该提供。这将为您的Snowflake帐户在您的租户中选择的资源上构建一个Azure服务主体,如AZURE_MULTI_TENANT_APP_NAME
中所示。
- 授予在您的租户中创建的上述服务主体
Storage Blob Data Contributor
角色。
完成后,您将能够从Snowflake访问存储帐户。
英文:
>Failure using stage area. Cause: Server failed to authenticate the request. (Status Code: 401; Error Code: InvalidAuthenticationInfo) in AZURE Storage
When using shared access signature, the error message states that Snowflake is unable to access the remote file and proposes that you provide Snowflake adequate access permission in Azure Blob Storage.
To resolve this:
Grant Snowflake Access to the Storage Locations
- Execute the
DESCRIBE INTEGRATION
command to retrieve the consent URL:
DESC STORAGE INTEGRATION azsf_mydb_aug23;
- Navigate to the URL in the
AZURE_CONSENT_URL
column in a web browser. Accept the offer by clicking the Accept button. This will construct an Azure service principal for your Snowflake account on the resources selected within your tenant. as shown inAZURE_MULTI_TENANT_APP_NAME
- Grant
Storage Blob Data Contributor
role to above service principal which got created in your tenant.
After this you will be able to access storage account from Snowflake
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论