Access Azure blob storage from R notebook
The AzureStor package provides an R interface to Azure storage, including files, blobs and ADLSgen2.
endp <- storage_endpoint("https://acctname.blob.core.windows.net", key="access_key")cont <- storage_container(endp, "mycontainer")storage_download(cont, "myblob.csv", "local_filename.csv")
Note that this will download to a file in local storage. From there, you can ingest into Spark using standard Sparklyr methods.
Disclaimer: I'm the author of AzureStor.
If you do not want to download it, create a tempfile and then read from it
endp <- storage_endpoint("https://acctname.blob.core.windows.net", key="access_key") cont <- storage_container(endp, "mycontainer") fname <- tempfile() storage_download(cont, "myblob.csv", fname) df = read.csv(fname)