getting error 151

Jags ken 1 Reputation point
2021-04-26T13:02:29.707+00:00

Error writing to cloud storage: The remote server returned an error: (400) Bad Request.. Please check the url. . ( Error 0151 )
when trying to export data frame from output port to blob storage as csv file from azure ML studio

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,559 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,425 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 46,326 Reputation points
    2021-04-26T16:07:47.717+00:00

    According to the offical tutorial Export to Azure Blob Storage, there are two authentication types for exporting data to Azure Blob Storage: SAS and Account. The description for them as below.

    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.

    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.

    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.

    Based on the error description above, the error should be caused by the blob url with SAS incorrectly generated by the Export Data module code with account information. May I think the code is old and not compatible with the new V2 storage API or API version information. You can report it to feedback.azure.com.

    However, I switched to use SAS authentication type to type a blob url with a SAS query string of my container which I generated via Azure Storage Explorer tool as below, it works fine.

    1: Right click on the container of your Blob Storage account, and click the Get Shared Access Signature

    1fyFL.png

    2: Enable the permission Write and click Create button

    3: Copy the Query string value, and build a blob url with a container SAS query string like https://<account name>.blob.core.windows.net/<container name>/<blob name><query string>

    Regards,
    Yutong

    0 comments No comments