Reputation: 1
Xposted question..
I am setting up a script from Azure Batch Services and have it injected to Azure Data Factory using Custom Batch Service.
From On-Prem (from my local computer): I can save the file to blob using "Set-AzureStorageBlobContent" though PowerShell just fine. (Set-AzureStorageBlobContent is only for uploading files from local to Azure, not Azure to Azure)
From Cloud Shell, I can run $data | export-CSV -path ($home + "/clouddrive/" + $SubName + "result.csv") –NoType
However, from Cloud Shell. but it won't let me save the CSV to my blob storage, this is the steps:
I use cd to go to the blob storage container, where all my file resides e.g. azure\storageaccount\blob\container\xxxx\
Within the very directory.....I ran: $data | export-csv .\result.csv -notype
I get this error:
Export-Csv : Cannot open file because the current provider (SHiPS\SHiPS) cannot open a file.
I know it must have to do with the way I specify the out-path of the CSV file, or is it just not possible to export a file directly from Cloud Shell to blob storage?
Upvotes: 0
Views: 587
Reputation: 3484
If your requirement is to send a file directly from Cloud Shell to Azure Blob Storage then it is possible as illustrated in below screenshots.
Upvotes: 0