Connecting to subfolders in ADLS container through Azurestor

I'm using the Azurestor package to access ADLS from r workbench. The problem I'm running into is that the container I want to connect to has many many files and doing storage_multidownload the way I have below takes forever. However I'm having trouble drilling down to a subfolder within the blob container initially (my thinking is that I can save time on searching this way). I've tried adding it to the container but it doesn't recognize the path. See error below. I'm also open to other solutions.

#this works
ADLS_CONTAINER <- 'container_name'
ADLS_URL <- "https://mystorage.blob.core.windows.net/"
tokenMSI <- AzureAuth::get_managed_token()
endp1 <- storage_endpoint(ADLS_URL, token = tokenMSI)
cont <- storage_container(endp1, ADLS_CONTAINER)
list_of_files = list_storage_files(cont)
storage_multidownload(cont, src="folder/file_name/**", dest="~/folder",overwrite = TRUE) #here I am getting files that start in a particular subfolder and start with a particular file name

#this throws an error
ADLS_CONTAINER <- 'container_name/folder'
ADLS_URL <- "https://mystorage.blob.core.windows.net/"
tokenMSI <- AzureAuth::get_managed_token()
endp1 <- storage_endpoint(ADLS_URL, token = tokenMSI)
cont <- storage_container(endp1, ADLS_CONTAINER)
list_of_files = list_storage_files(cont)
storage_multidownload(cont, src="folder/file_name/**", dest="~/folder",overwrite = TRUE)


#the error
Error in process_storage_response(response, match.arg(http_status_handler), :
Bad Request (HTTP 400). Failed to complete Storage Services operation. Message:
InvalidUri
The requested URI does not represent any resource on the server.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.