I need to download CSV file from Azure Storage Account, Are there any ways to download the file(CSV) using java SDK or rest API? what API's need to be used?
Asked
Active
Viewed 1,799 times
2
-
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java#L86 , this link shall help – Tushar Mahajan Jun 18 '20 at 13:44
1 Answers
1
You can use the Azure Storage SDK for java . To download a file, you just need to use the class CloudBlockBlob which should look like,
// Download the blob to a local file
// Append the string "DOWNLOAD" before the .txt extension so that you can see both files.
String downloadFileName = fileName.replace(".txt", "DOWNLOAD.txt");
File downloadedFile = new File(localPath + downloadFileName);
System.out.println("\nDownloading blob to\n\t " + localPath + downloadFileName);
blobClient.downloadToFile(localPath + downloadFileName);

Sajeetharan
- 216,225
- 63
- 350
- 396
-
Thank you, Is it possible to get a connection string also from java SDK using tenant id,Client Id, Application Id? – DAK Jun 19 '20 at 04:21
-
-
-
I need to create a client with tenant Id, Application Id, Client Secret after Authentication. Is it better to use ADAL for Authentication Validation rather than MSAL – DAK Jun 19 '20 at 04:45