# NOT RUN {
# download from blob storage
bl <- storage_endpoint("https://mystorage.blob.core.windows.net/", key="access_key")
cont <- storage_container(bl, "mycontainer")
storage_download(cont, "bigfile.zip", "~/bigfile.zip")
# same download but directly from the URL
download_from_url("https://mystorage.blob.core.windows.net/mycontainer/bigfile.zip",
"~/bigfile.zip",
key="access_key")
# upload to ADLSgen2
ad <- storage_endpoint("https://myadls.dfs.core.windows.net/", token=mytoken)
cont <- storage_container(ad, "myfilesystem")
create_storage_dir(cont, "newdir")
storage_upload(cont, "files.zip", "newdir/files.zip")
# same upload but directly to the URL
upload_to_url("files.zip",
"https://myadls.dfs.core.windows.net/myfilesystem/newdir/files.zip",
token=mytoken)
# }
Run the code above in your browser using DataLab