September 28, 2023 at 7:47 am
Hi All,
I have been trying to download a csv file which is produced by calling an api and then to store the csv file directly in azure blob storage. I am able to download the file on my local machine and then copy it to azure blob storage. But I would like to copy the file directly in azure blob storage due to that this powershell code will be running on azure data factory via azure batch services. When I try this change of code given below to directly download the file in blob storage, I get an error "Can't find a drive, DriveNotFound exception". I am unable to understand the issue. Can someone please help me here? I have also attached the screenshot of the complete script.
$reportlink = Invoke-WebRequest -Uri ($output.Headers.Location) -Headers @{Authorization = "Bearer $accessToken"} -UseBasicParsing
$originalData = Invoke-WebRequest -Uri (($reportlink.Content | ConvertFrom-Json).Manifest.blobs.blobLink) -UseBasicParsing
Set-AzStorageBlobContent -File $originalData -Container $ContainerName -Blob $OutputFileName -Context (New-AzStorageContext -StorageAccountName $AzureStorageAccountName -StorageAccountKey $AzureStorageAccountKey)
Regards,
Prakash
Thanks,
Charmer
September 29, 2023 at 8:10 am
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy