Using Microsoft Azure Blog Storage from within R using AzureSMR

Using Microsoft Azure Blog Storage from within R using AzureSMR

One of the great new features that AzureSMR is enabling is the read and write access to Azure Blog Storage. This is happening in a similar manner as is the case for when you use Python.

Shameless copy from the README:

In order to access Storage Blobs you need to have a key. Use azureSAGetKey() to get a Key or alternatively supply your own key. When you provide your own key you no longer need to use azureAuthenticate() since the API uses a diferent authentication approach.

sKey <- AzureSAGetKey(sc, resourceGroup = "Analytics", storageAccount = "analyticsfiles")
To list containers in a storage account use azureListContainers()

azListContainers(sc, storageAccount = "analyticsfiles", containers = "Test")
To list blobs in a container use azureListStorageBlobs()

azureListStorageBlobs(sc, storageAccount = "analyticsfiles", container = "test")
To Write a Blobs use azurePutBlob()

AzurePutBlob(sc, StorageAccount = "analyticsfiles", container = "test",
contents = "Hello World",
blob = "HELLO")

To read a blob in a container use azureGetBlob()

azureGetBlob(sc, storageAccount = "analyticsfiles", container = "test",
blob="HELLO",
type="text")

2 Replies to “Using Microsoft Azure Blog Storage from within R using AzureSMR”

  1. Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you!
    By the way, how could we communicate?

Leave a Reply

Your email address will not be published. Required fields are marked *