Azure ML studio 导出数据 Azure Storage V2

Azure ML studio export data Azure Storage V2

我已经 post 我的问题 here 他们建议我在这里 post 它。 我正在尝试将数据从 Azure ML 导出到 Azure 存储,但出现此错误:

写入云存储时出错:远程服务器返回错误:(400) 错误请求。请检查url。 . (错误 0151)

我的 blob 存储配置是 Storage v2 / Standard 并且要求安全传输设置为已启用。

如果我将需要安全传输设置为禁用,导出工作正常。

如何在要求安全传输设置为启用的情况下将数据导出到我的 blob 存储?

根据官方教程Export to Azure Blob Storage,将数据导出到Azure Blob Storage有两种身份验证类型:SAS和Account。他们的描述如下。

  1. For Authentication type, choose Public (SAS URL) if you know that the storage supports access via a SAS URL.

    A SAS URL is a special type of URL that can be generated by using an Azure storage utility, and is available for only a limited time. It contains all the information that is needed for authentication and download.

    For URI, type or paste the full URI that defines the account and the public blob.

  2. For private accounts, choose Account, and provide the account name and the account key, so that the experiment can write to the storage account.

    • Account name: Type or paste the name of the account where you want to save the data. For example, if the full URL of the storage account is http://myshared.blob.core.windows.net, you would type myshared.

    • Account key: Paste the storage access key that is associated with the account.

我尝试使用如图所示的简单模块组合和下面的Python代码来测试您遇到的问题。

import pandas as pd

def azureml_main(dataframe1 = None, dataframe2 = None):
    dataframe1 = pd.DataFrame(data={'col1': [1, 2], 'col2': [3, 4]})
    return dataframe1,

当我尝试使用我的 Blob Storage V2 帐户的身份验证类型 Account 时,我遇到了与您相同的问题,错误代码为 Error 0151,如下所示,通过单击 View error log View output log的link下的按钮。

Error 0151

There was an error writing to cloud storage. Please check the URL.

This error in Azure Machine Learning occurs when the module tries to write data to cloud storage but the URL is unavailable or invalid.

Resolution Check the URL and verify that it is writable.

Exception Messages

  • Error writing to cloud storage (possibly a bad url).
  • Error writing to cloud storage: {0}. Please check the url.

根据上面的错误描述,错误应该是url with SAS 由带有账户信息的Export Data模块代码错误生成的blob引起的。可能我认为代码是旧的并且不兼容新的V2存储API或API版本信息。你可以举报给feedback.azure.com.

但是,我切换到使用 SAS 身份验证类型来键入一个 blob url 以及我通过 Azure Storage Explorer 工具生成的容器的 SAS 查询字符串,如下所示,它有效很好。

图 1:右键单击您的 Blob 存储帐户的容器,然后单击 Get Shared Access Signature

图2:启用权限Write(推荐使用UTC时区)点击Create按钮

图 3:复制 Query string 值,并使用类似 https://<account name>.blob.core.windows.net/<container name>/<blob name><query string>

的容器 SAS 查询字符串构建 blob url

注意:容器中必须不存在blob,否则会造成Error 0057