1
Vote

opening netcdf file directly from azure blob storage

description

Hi,
I am currently working with the SDS library reading and creating netCDF files from and to the file system of my web server on azure successfully.
Now, I want to store/read this datasets directly on Blob storage without having to go back and forth from blob to disk. At least, I want to open the dataset directly from the blob.

I can see two alternatives in the SDS library, just using DataSet.Open passing the azure blob URI or, probably the right thing, using AzureDataSet.Open and passing an AzureDataSetUri.

My problem is that I do not know how to correctly specify the URI when the file is on blob storage. I tried the obvious but did not work.

I know my accountName and AccountKey are good to access my blob storage account using basic cloud storage operations like this:
    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
    CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
    CloudBlobContainer container = blobClient.GetContainerReference("ourcontainer");
    CloudBlobStream fileStream = blockBlob.OpenWrite()
Using this information, I am trying to build my URI for the AzureDataSet but I am failing.
I am trying things like this:
  var azureDataSet_URI = new AzureDataSetUri();
        azureDataSet_URI.OpenMode = ResourceOpenMode.Create;
        azureDataSet_URI.AccountKey = "xxxxxxx";
        azureDataSet_URI.AccountName = "xxxxxxx";
        azureDataSet_URI.DataSetID = "123456789";
        azureDataSet_URI.DataSetName = "testing";
        azureDataSet_URI.DefaultEndpointsProtocol = EndpointProtocol.http;

        //{"Error while getting dataSets Schemas:Failed to get configuration container from blob storage:The specified container does not exist."}

        var dataset_from_Azure = AzureDataSet.Open(azureDataSet_URI);
How should I specify the container?.. what is Host?.. what is Absolute URI?
Any help very much appreciated!!

Pablo

comments